[v4,1/1] objdump, as: Add callx support for BPF CPU v1
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_binutils_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-arm |
success
|
Testing passed
|
Commit Message
Add support for (dis)assembling the callx instruction back to CPU v1.
gas/ChangeLog:
* testsuite/gas/bpf/indcall-1-pseudoc.d: Remove xbpf CPU variant ...
* testsuite/gas/bpf/indcall-1.d: ... specification from callx tests.
opcodes/ChangeLog:
* bpf-opc.c: Move callx into the v1 BPF CPU variant.
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
---
gas/testsuite/gas/bpf/indcall-1-pseudoc.d | 4 ++--
gas/testsuite/gas/bpf/indcall-1.d | 4 ++--
opcodes/bpf-opc.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
Comments
Hi Will.
I have just installed this change on your behalf after a little
adjustment of the changelog entries.
Thanks for your contribution!
> Add support for (dis)assembling the callx instruction back to CPU v1.
>
> gas/ChangeLog:
>
> * testsuite/gas/bpf/indcall-1-pseudoc.d: Remove xbpf CPU variant ...
> * testsuite/gas/bpf/indcall-1.d: ... specification from callx tests.
>
> opcodes/ChangeLog:
>
> * bpf-opc.c: Move callx into the v1 BPF CPU variant.
>
> Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
> ---
> gas/testsuite/gas/bpf/indcall-1-pseudoc.d | 4 ++--
> gas/testsuite/gas/bpf/indcall-1.d | 4 ++--
> opcodes/bpf-opc.c | 2 +-
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/gas/testsuite/gas/bpf/indcall-1-pseudoc.d b/gas/testsuite/gas/bpf/indcall-1-pseudoc.d
> index 7a95bad8e65..ae49cd1c446 100644
> --- a/gas/testsuite/gas/bpf/indcall-1-pseudoc.d
> +++ b/gas/testsuite/gas/bpf/indcall-1-pseudoc.d
> @@ -1,5 +1,5 @@
> -#as: -EL -mdialect=pseudoc -misa-spec=xbpf
> -#objdump: -M xbpf,pseudoc,dec -dr
> +#as: -EL -mdialect=pseudoc
> +#objdump: -M pseudoc,dec -dr
> #source: indcall-1-pseudoc.s
> #name: BPF indirect call 1, pseudoc syntax
>
> diff --git a/gas/testsuite/gas/bpf/indcall-1.d b/gas/testsuite/gas/bpf/indcall-1.d
> index 51103bba2a1..48e351fdaae 100644
> --- a/gas/testsuite/gas/bpf/indcall-1.d
> +++ b/gas/testsuite/gas/bpf/indcall-1.d
> @@ -1,5 +1,5 @@
> -#as: -EL -misa-spec=xbpf
> -#objdump: -dr -M xbpf,dec
> +#as: -EL
> +#objdump: -dr -M dec
> #source: indcall-1.s
> #name: BPF indirect call 1, normal syntax
>
> diff --git a/opcodes/bpf-opc.c b/opcodes/bpf-opc.c
> index 19e096501a2..0524f4c7e1c 100644
> --- a/opcodes/bpf-opc.c
> +++ b/opcodes/bpf-opc.c
> @@ -273,7 +273,7 @@ const struct bpf_opcode bpf_opcodes[] =
> {BPF_INSN_JNER, "jne%W%dr , %sr , %d16", "if%w%dr != %sr%wgoto%w%d16",
> BPF_V1, BPF_CODE, BPF_CLASS_JMP|BPF_CODE_JNE|BPF_SRC_X},
> {BPF_INSN_CALLR, "call%W%dr", "callx%w%dr",
> - BPF_XBPF, BPF_CODE, BPF_CLASS_JMP|BPF_CODE_CALL|BPF_SRC_X},
> + BPF_V1, BPF_CODE, BPF_CLASS_JMP|BPF_CODE_CALL|BPF_SRC_X},
> {BPF_INSN_CALL, "call%W%d32", "call%w%d32",
> BPF_V1, BPF_CODE, BPF_CLASS_JMP|BPF_CODE_CALL|BPF_SRC_K},
> {BPF_INSN_EXIT, "exit", "exit",
@@ -1,5 +1,5 @@
-#as: -EL -mdialect=pseudoc -misa-spec=xbpf
-#objdump: -M xbpf,pseudoc,dec -dr
+#as: -EL -mdialect=pseudoc
+#objdump: -M pseudoc,dec -dr
#source: indcall-1-pseudoc.s
#name: BPF indirect call 1, pseudoc syntax
@@ -1,5 +1,5 @@
-#as: -EL -misa-spec=xbpf
-#objdump: -dr -M xbpf,dec
+#as: -EL
+#objdump: -dr -M dec
#source: indcall-1.s
#name: BPF indirect call 1, normal syntax
@@ -273,7 +273,7 @@ const struct bpf_opcode bpf_opcodes[] =
{BPF_INSN_JNER, "jne%W%dr , %sr , %d16", "if%w%dr != %sr%wgoto%w%d16",
BPF_V1, BPF_CODE, BPF_CLASS_JMP|BPF_CODE_JNE|BPF_SRC_X},
{BPF_INSN_CALLR, "call%W%dr", "callx%w%dr",
- BPF_XBPF, BPF_CODE, BPF_CLASS_JMP|BPF_CODE_CALL|BPF_SRC_X},
+ BPF_V1, BPF_CODE, BPF_CLASS_JMP|BPF_CODE_CALL|BPF_SRC_X},
{BPF_INSN_CALL, "call%W%d32", "call%w%d32",
BPF_V1, BPF_CODE, BPF_CLASS_JMP|BPF_CODE_CALL|BPF_SRC_K},
{BPF_INSN_EXIT, "exit", "exit",