aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2019-07-14 14:45:31 +0200
committerJose E. Marchesi <jose.marchesi@oracle.com>2019-07-14 14:45:31 +0200
commit92434a14b97bf07546701613a16aaf4d8a3b3eca (patch)
treee60ab4f22c2660c51d887ff4c23aaf965c34df0f /gas
parentda73816739483bac537403262cef1c460e43319f (diff)
downloadgdb-92434a14b97bf07546701613a16aaf4d8a3b3eca.zip
gdb-92434a14b97bf07546701613a16aaf4d8a3b3eca.tar.gz
gdb-92434a14b97bf07546701613a16aaf4d8a3b3eca.tar.bz2
cpu,opcodes,gas: fix arguments to ldabs and ldind eBPF instructions
The eBPF non-generic load instructions ldind{b,h,w,dw} and ldabs{b,h,w,dw} do not take an explicit destination register as an argument. Instead, they put the loaded value in %r0, implicitly. This patch fixes the CPU BPF description to not expect a 'dst' argument in these arguments, regenerates the corresponding files in opcodes, and updates the impacted GAS tests. Tested in a x86-64 host. cpu/ChangeLog: 2019-07-14 Jose E. Marchesi <jose.marchesi@oracle.com> * bpf.cpu (dlsi): ldabs and ldind instructions do not take an explicit 'dst' argument. opcodes/ChangeLog: 2019-07-14 Jose E. Marchesi <jose.marchesi@oracle.com> * bpf-desc.c: Regenerate. * bpf-opc.c: Likewise. gas/ChangeLog: 2019-07-14 Jose E. Marchesi <jose.marchesi@oracle.com> * testsuite/gas/bpf/mem.s: Do not use explicit arguments for ldabs and ldind instructions. * testsuite/gas/bpf/mem.d: Updated accordingly. * testsuite/gas/bpf/mem-be.d: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/testsuite/gas/bpf/mem-be.d16
-rw-r--r--gas/testsuite/gas/bpf/mem.d16
-rw-r--r--gas/testsuite/gas/bpf/mem.s16
4 files changed, 31 insertions, 24 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0ec0d52..fb44aa3 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2019-07-14 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * testsuite/gas/bpf/mem.s: Do not use explicit arguments for
+ ldabs and ldind instructions.
+ * testsuite/gas/bpf/mem.d: Updated accordingly.
+ * testsuite/gas/bpf/mem-be.d: Likewise.
+
2019-07-09 Alan Modra <amodra@gmail.com>
* config/obj-elf.c (elf_frob_symbol): Remove mips hacks.
diff --git a/gas/testsuite/gas/bpf/mem-be.d b/gas/testsuite/gas/bpf/mem-be.d
index 70d8806..7a258bc 100644
--- a/gas/testsuite/gas/bpf/mem-be.d
+++ b/gas/testsuite/gas/bpf/mem-be.d
@@ -8,14 +8,14 @@
Disassembly of section .text:
0+ <.text>:
- 0: 20 23 00 00 00 00 be ef ldabsw %r2,%r3,0xbeef
- 8: 28 45 00 00 00 00 be ef ldabsh %r4,%r5,0xbeef
- 10: 30 67 00 00 00 00 be ef ldabsb %ctx,%r7,0xbeef
- 18: 38 89 00 00 00 00 be ef ldabsdw %r8,%r9,0xbeef
- 20: 40 23 00 00 00 00 be ef ldindw %r2,%r3,0xbeef
- 28: 48 45 00 00 00 00 be ef ldindh %r4,%r5,0xbeef
- 30: 50 67 00 00 00 00 be ef ldindb %ctx,%r7,0xbeef
- 38: 58 89 00 00 00 00 be ef ldinddw %r8,%r9,0xbeef
+ 0: 20 03 00 00 00 00 be ef ldabsw %r3,0xbeef
+ 8: 28 05 00 00 00 00 be ef ldabsh %r5,0xbeef
+ 10: 30 07 00 00 00 00 be ef ldabsb %r7,0xbeef
+ 18: 38 09 00 00 00 00 be ef ldabsdw %r9,0xbeef
+ 20: 40 03 00 00 00 00 be ef ldindw %r3,0xbeef
+ 28: 48 05 00 00 00 00 be ef ldindh %r5,0xbeef
+ 30: 50 07 00 00 00 00 be ef ldindb %r7,0xbeef
+ 38: 58 09 00 00 00 00 be ef ldinddw %r9,0xbeef
40: 61 21 7e ef 00 00 00 00 ldxw %r2,\[%r1\+0x7eef\]
48: 69 21 7e ef 00 00 00 00 ldxh %r2,\[%r1\+0x7eef\]
50: 71 21 7e ef 00 00 00 00 ldxb %r2,\[%r1\+0x7eef\]
diff --git a/gas/testsuite/gas/bpf/mem.d b/gas/testsuite/gas/bpf/mem.d
index 5349276..4587ffd 100644
--- a/gas/testsuite/gas/bpf/mem.d
+++ b/gas/testsuite/gas/bpf/mem.d
@@ -7,14 +7,14 @@
Disassembly of section .text:
0+ <.text>:
- 0: 20 32 00 00 ef be 00 00 ldabsw %r2,%r3,0xbeef
- 8: 28 54 00 00 ef be 00 00 ldabsh %r4,%r5,0xbeef
- 10: 30 76 00 00 ef be 00 00 ldabsb %ctx,%r7,0xbeef
- 18: 38 98 00 00 ef be 00 00 ldabsdw %r8,%r9,0xbeef
- 20: 40 32 00 00 ef be 00 00 ldindw %r2,%r3,0xbeef
- 28: 48 54 00 00 ef be 00 00 ldindh %r4,%r5,0xbeef
- 30: 50 76 00 00 ef be 00 00 ldindb %ctx,%r7,0xbeef
- 38: 58 98 00 00 ef be 00 00 ldinddw %r8,%r9,0xbeef
+ 0: 20 30 00 00 ef be 00 00 ldabsw %r3,0xbeef
+ 8: 28 50 00 00 ef be 00 00 ldabsh %r5,0xbeef
+ 10: 30 70 00 00 ef be 00 00 ldabsb %r7,0xbeef
+ 18: 38 90 00 00 ef be 00 00 ldabsdw %r9,0xbeef
+ 20: 40 30 00 00 ef be 00 00 ldindw %r3,0xbeef
+ 28: 48 50 00 00 ef be 00 00 ldindh %r5,0xbeef
+ 30: 50 70 00 00 ef be 00 00 ldindb %r7,0xbeef
+ 38: 58 90 00 00 ef be 00 00 ldinddw %r9,0xbeef
40: 61 12 ef 7e 00 00 00 00 ldxw %r2,\[%r1\+0x7eef\]
48: 69 12 ef 7e 00 00 00 00 ldxh %r2,\[%r1\+0x7eef\]
50: 71 12 ef 7e 00 00 00 00 ldxb %r2,\[%r1\+0x7eef\]
diff --git a/gas/testsuite/gas/bpf/mem.s b/gas/testsuite/gas/bpf/mem.s
index cc5329c..f0f1d08 100644
--- a/gas/testsuite/gas/bpf/mem.s
+++ b/gas/testsuite/gas/bpf/mem.s
@@ -2,14 +2,14 @@
.text
- ldabsw %r2, %r3, 0xbeef
- ldabsh %r4, %r5, 0xbeef
- ldabsb %r6, %r7, 0xbeef
- ldabsdw %r8, %r9, 0xbeef
- ldindw %r2, %r3, 0xbeef
- ldindh %r4, %r5, 0xbeef
- ldindb %r6, %r7, 0xbeef
- ldinddw %r8, %r9, 0xbeef
+ ldabsw %r3, 0xbeef
+ ldabsh %r5, 0xbeef
+ ldabsb %r7, 0xbeef
+ ldabsdw %r9, 0xbeef
+ ldindw %r3, 0xbeef
+ ldindh %r5, 0xbeef
+ ldindb %r7, 0xbeef
+ ldinddw %r9, 0xbeef
ldxw %r2, [%r1+0x7eef]
ldxh %r2, [%r1+0x7eef]
ldxb %r2, [%r1+0x7eef]