summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-nios2/u16.s
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-nios2/u16.s')
-rw-r--r--ld/testsuite/ld-nios2/u16.s16
1 files changed, 16 insertions, 0 deletions
diff --git a/ld/testsuite/ld-nios2/u16.s b/ld/testsuite/ld-nios2/u16.s
new file mode 100644
index 0000000..b890682
--- /dev/null
+++ b/ld/testsuite/ld-nios2/u16.s
@@ -0,0 +1,16 @@
+# Test for Nios II 32-bit, 16 and 8-bit relocations
+
+.set noat
+.set some_other_sym, 0x1000
+.text
+.global _start
+_start:
+# unsigned 16-bit relocation
+ andi r1, r1, some_sym
+ andi r1, r1, min
+ andi r1, r1, max
+ andi r1, r1, some_sym + some_other_sym + 1
+ andi r1, r1, some_sym - some_other_sym + 1
+
+
+