diff options
author | mengqinggang <mengqinggang@loongson.cn> | 2023-09-28 16:41:15 +0800 |
---|---|---|
committer | liuzhensong <liuzhensong@loongson.cn> | 2023-12-18 18:36:21 +0800 |
commit | dc5f359ed6a36d2c895d89c3e4886f3a2b6d9232 (patch) | |
tree | ca60c74de15fdc76c54e8eb3a7d881078f3585d7 /gas/testsuite | |
parent | d51cd0f64c6d3bd235f140ed71cc2c3e0b87a5ff (diff) | |
download | gdb-dc5f359ed6a36d2c895d89c3e4886f3a2b6d9232.zip gdb-dc5f359ed6a36d2c895d89c3e4886f3a2b6d9232.tar.gz gdb-dc5f359ed6a36d2c895d89c3e4886f3a2b6d9232.tar.bz2 |
LoongArch: Add new relocation R_LARCH_CALL36
R_LARCH_CALL36 is used for medium code model function call pcaddu18i+jirl, and
these two instructions must adjacent.
The LoongArch ABI v2.20 at here: https://github.com/loongson/la-abi-specs.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/loongarch/medium-call.d | 15 | ||||
-rw-r--r-- | gas/testsuite/gas/loongarch/medium-call.s | 6 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gas/testsuite/gas/loongarch/medium-call.d b/gas/testsuite/gas/loongarch/medium-call.d new file mode 100644 index 0000000..4183818 --- /dev/null +++ b/gas/testsuite/gas/loongarch/medium-call.d @@ -0,0 +1,15 @@ +#as: +#objdump: -dr + +.*:[ ]+file format .* + + +Disassembly of section .text: + +.* <.text>: +[ ]+0:[ ]+1e000001[ ]+pcaddu18i[ ]+\$ra, 0 +[ ]+0: R_LARCH_CALL36[ ]+a +[ ]+4:[ ]+4c000021[ ]+jirl[ ]+\$ra, \$ra, 0 +[ ]+8:[ ]+1e00000c[ ]+pcaddu18i[ ]+\$t0, 0 +[ ]+8: R_LARCH_CALL36[ ]+a +[ ]+c:[ ]+4c000180[ ]+jr[ ]+\$t0 diff --git a/gas/testsuite/gas/loongarch/medium-call.s b/gas/testsuite/gas/loongarch/medium-call.s new file mode 100644 index 0000000..f2977d1 --- /dev/null +++ b/gas/testsuite/gas/loongarch/medium-call.s @@ -0,0 +1,6 @@ + # call .L1, r1(ra) temp register, r1(ra) return register. + pcaddu18i $r1, %call36(a) + jirl $r1, $r1, 0 + # tail .L1, r12(t0) temp register, r0(zero) return register. + pcaddu18i $r12, %call36(a) + jirl $r0, $r12, 0 |