summaryrefslogtreecommitdiff
path: root/util/romcc/tests
diff options
context:
space:
mode:
Diffstat (limited to 'util/romcc/tests')
-rw-r--r--util/romcc/tests/simple_test31.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/util/romcc/tests/simple_test31.c b/util/romcc/tests/simple_test31.c
new file mode 100644
index 0000000000..4ce77d3f6d
--- /dev/null
+++ b/util/romcc/tests/simple_test31.c
@@ -0,0 +1,16 @@
+
+static unsigned pci_locate_device(unsigned addr)
+{
+ addr &= ~0xff;
+ for(; addr <= 0x00ffff00; addr += 0x00000100) {
+ __builtin_outl(addr, 0x12);
+ }
+ return addr;
+}
+
+static void main(void)
+{
+ unsigned long addr;
+ addr = pci_locate_device(0);
+ __builtin_outl(addr, 0x12);
+}