- Update romcc to version 0.27 and add more tests.
[coreboot.git] / util / romcc / tests / simple_test24.c
diff --git a/util/romcc/tests/simple_test24.c b/util/romcc/tests/simple_test24.c
new file mode 100644 (file)
index 0000000..01413c2
--- /dev/null
@@ -0,0 +1,16 @@
+void smbus_read_byte(void)
+{
+       unsigned char host_status_register;
+       unsigned char byte;
+       int result;
+
+       host_status_register = __builtin_inb(0x1234);
+
+       /* read results of transaction */
+       byte = __builtin_inb(0x4567);
+
+       result = byte;
+       if (host_status_register != 0x02) {
+               result = -1;
+       }
+}