aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2019-07-15 16:00:28 +0200
committerJose E. Marchesi <jose.marchesi@oracle.com>2019-07-15 16:00:28 +0200
commit3719fd55b6f89662653d50d33bb267c5f21127a5 (patch)
tree7c046c3a10249178af42ff1ab11ba51468b62d6c /gas
parent5b9d7a9a647260ba754fbd2a176d37806f15acc8 (diff)
downloadgdb-3719fd55b6f89662653d50d33bb267c5f21127a5.zip
gdb-3719fd55b6f89662653d50d33bb267c5f21127a5.tar.gz
gdb-3719fd55b6f89662653d50d33bb267c5f21127a5.tar.bz2
cpu,opcodes,gas: fix explicit arguments to eBPF ldabs instructions
This patch fixes the eBPF CPU description in order to reflect the right explicit arguments passed to the ldabs{b,h,w,dw} instructions, updates the corresponding GAS tests, and updates the BPF section of the GAS manual. cpu/ChangeLog: 2019-07-15 Jose E. Marchesi <jose.marchesi@oracle.com> * bpf.cpu (dlabs): New pmacro. (dlind): Likewise. opcodes/ChangeLog: 2019-07-15 Jose E. Marchesi <jose.marchesi@oracle.com> * bpf-desc.c: Regenerate. * bpf-opc.c: Likewise. * bpf-opc.h: Likewise. gas/ChangeLog: 2019-07-15 Jose E. Marchesi <jose.marchesi@oracle.com> * testsuite/gas/bpf/mem.s: ldabs instructions do not take a `src' register as an argument. * testsuite/gas/bpf/mem.d: Updated accordingly. * testsuite/gas/bpf/mem-be.d: Likewise. * doc/c-bpf.texi (BPF Opcodes): Update to reflect the correct explicit arguments to ldabs and ldind instructions.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog9
-rw-r--r--gas/doc/c-bpf.texi16
-rw-r--r--gas/testsuite/gas/bpf/mem-be.d8
-rw-r--r--gas/testsuite/gas/bpf/mem.d8
-rw-r--r--gas/testsuite/gas/bpf/mem.s8
5 files changed, 29 insertions, 20 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index fb44aa3..2d8a997 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,12 @@
+2019-07-15 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * testsuite/gas/bpf/mem.s: ldabs instructions do not take a `src'
+ register as an argument.
+ * testsuite/gas/bpf/mem.d: Updated accordingly.
+ * testsuite/gas/bpf/mem-be.d: Likewise.
+ * doc/c-bpf.texi (BPF Opcodes): Update to reflect the correct
+ explicit arguments to ldabs and ldind instructions.
+
2019-07-14 Jose E. Marchesi <jose.marchesi@oracle.com>
* testsuite/gas/bpf/mem.s: Do not use explicit arguments for
diff --git a/gas/doc/c-bpf.texi b/gas/doc/c-bpf.texi
index a7a694f..13f4144 100644
--- a/gas/doc/c-bpf.texi
+++ b/gas/doc/c-bpf.texi
@@ -234,26 +234,26 @@ tree for more information.
Absolute loads:
@table @code
-@item ldabsdw %d, %s, imm32
+@item ldabsdw imm32
Absolute 64-bit load.
-@item ldabsw %d, %s, imm32
+@item ldabsw imm32
Absolute 32-bit load.
-@item ldabsh %d, %s, imm32
+@item ldabsh imm32
Absolute 16-bit load.
-@item ldabsb %d, %s, imm32
+@item ldabsb imm32
Absolute 8-bit load.
@end table
Indirect loads:
@table @code
-@item ldinddw %d, %s, imm32
+@item ldinddw %s, imm32
Indirect 64-bit load.
-@item ldindw %d, %s, imm32
+@item ldindw %s, imm32
Indirect 32-bit load.
-@item ldindh %d, %s, imm32
+@item ldindh %s, imm32
Indirect 16-bit load.
-@item ldindb %d, %s, imm32
+@item ldindb %s, imm32
Indirect 8-bit load.
@end table
diff --git a/gas/testsuite/gas/bpf/mem-be.d b/gas/testsuite/gas/bpf/mem-be.d
index 7a258bc..b3dba80 100644
--- a/gas/testsuite/gas/bpf/mem-be.d
+++ b/gas/testsuite/gas/bpf/mem-be.d
@@ -8,10 +8,10 @@
Disassembly of section .text:
0+ <.text>:
- 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
+ 0: 20 00 00 00 00 00 be ef ldabsw 0xbeef
+ 8: 28 00 00 00 00 00 be ef ldabsh 0xbeef
+ 10: 30 00 00 00 00 00 be ef ldabsb 0xbeef
+ 18: 38 00 00 00 00 00 be ef ldabsdw 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
diff --git a/gas/testsuite/gas/bpf/mem.d b/gas/testsuite/gas/bpf/mem.d
index 4587ffd..0e0b498 100644
--- a/gas/testsuite/gas/bpf/mem.d
+++ b/gas/testsuite/gas/bpf/mem.d
@@ -7,10 +7,10 @@
Disassembly of section .text:
0+ <.text>:
- 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
+ 0: 20 00 00 00 ef be 00 00 ldabsw 0xbeef
+ 8: 28 00 00 00 ef be 00 00 ldabsh 0xbeef
+ 10: 30 00 00 00 ef be 00 00 ldabsb 0xbeef
+ 18: 38 00 00 00 ef be 00 00 ldabsdw 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
diff --git a/gas/testsuite/gas/bpf/mem.s b/gas/testsuite/gas/bpf/mem.s
index f0f1d08..af6f41b 100644
--- a/gas/testsuite/gas/bpf/mem.s
+++ b/gas/testsuite/gas/bpf/mem.s
@@ -2,10 +2,10 @@
.text
- ldabsw %r3, 0xbeef
- ldabsh %r5, 0xbeef
- ldabsb %r7, 0xbeef
- ldabsdw %r9, 0xbeef
+ ldabsw 0xbeef
+ ldabsh 0xbeef
+ ldabsb 0xbeef
+ ldabsdw 0xbeef
ldindw %r3, 0xbeef
ldindh %r5, 0xbeef
ldindb %r7, 0xbeef