aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-m68hc11/xgate-link.s
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-m68hc11/xgate-link.s')
-rw-r--r--ld/testsuite/ld-m68hc11/xgate-link.s16
1 files changed, 16 insertions, 0 deletions
diff --git a/ld/testsuite/ld-m68hc11/xgate-link.s b/ld/testsuite/ld-m68hc11/xgate-link.s
new file mode 100644
index 0000000..8413bd9
--- /dev/null
+++ b/ld/testsuite/ld-m68hc11/xgate-link.s
@@ -0,0 +1,16 @@
+;;; Test 16bit relocate with XGATE
+;;;
+ .sect .text
+ .globl _start
+_start:
+
+ ldw r1,#var1 ; expands to two IMM8 %hi,%lo relocate
+ add r5,#var2 ; expands to two IMM8 %hi,%lo relocate
+ ldl r2,#%lovar4 ; test explicit %lo
+ ldh r2,#%hivar4 ; test explicit %hi
+ ldl r3,#0x21 ; regular IMM8
+ ldh r6,#var5 ; IMM8 with relocate
+ cmp r1,#0xabcd ; expands to two IMM8 with constant
+ cmp r2,#var3 ; expands to two IMM8 %hi,%lo relocate
+ ldw r1,#var6
+ ldw r2,#var6+0x104 ; check for correct carry