aboutsummaryrefslogtreecommitdiff
path: root/gas/ChangeLog
diff options
context:
space:
mode:
authorGuillermo E. Martinez <guillermo.e.martinez@oracle.com>2023-04-20 16:37:01 +0200
committerJose E. Marchesi <jose.marchesi@oracle.com>2023-04-26 19:27:41 +0200
commitff5a51b377212532a0cf2acea37c6a5672893d8f (patch)
tree6659e215c5fc14b8b5b43560dc1da7924f529b71 /gas/ChangeLog
parent873a1ec4059a2d58899e427a996bf4c3965d93da (diff)
downloadgdb-ff5a51b377212532a0cf2acea37c6a5672893d8f.zip
gdb-ff5a51b377212532a0cf2acea37c6a5672893d8f.tar.gz
gdb-ff5a51b377212532a0cf2acea37c6a5672893d8f.tar.bz2
gas: support for the BPF pseudo-c assembly syntax
This patch adds support to the GNU assembler for an alternative assembly syntax used in BPF. This syntax is C-like and very unconventional for an assembly language, but it is generated by clang/llvm and is also used in inline asm templates in kernel code, so we ought to support it. After this patch, the assembler is able to parse instructions in both supported syntax: the normal assembly-like syntax and the pseudo-C syntax. Instruction formats can be mixed in the source program: the assembler recognizes the right syntax to use. gas/ChangeLog: 2023-04-20 Guillermo E. Martinez <guillermo.e.martinez@oracle.com> PR gas/29728 * config/tc-bpf.h (TC_EQUAL_IN_INSN): Define. * config/tc-bpf.c (LEX_IS_SYMBOL_COMPONENT): Define. (LEX_IS_WHITESPACE): Likewise. (LEX_IS_NEWLINE): Likewise. (LEX_IS_ARITHM_OP): Likewise. (LEX_IS_STAR): Likewise. (LEX_IS_CLSE_BR): Likewise. (LEX_IS_OPEN_BR): Likewise. (LEX_IS_EQUAL): Likewise. (LEX_IS_EXCLA): Likewise. (ST_EOI): Likewise. (MAX_TOKEN_SZ): Likewise. (init_pseudoc_lex): New function. (md_begin): Call init_pseudoc_lex. (valid_expr): New function. (build_bpf_non_generic_load): Likewise. (build_bpf_atomic_insn): Likewise. (build_bpf_jmp_insn): Likewise. (build_bpf_arithm_insn): Likewise. (build_bpf_endianness): Likewise. (build_bpf_load_store_insn): Likewise. (look_for_reserved_word): Likewise. (is_register): Likewise. (is_cast): Likewise. (get_token): Likewise. (bpf_pseudoc_to_normal_syntax): Likewise. (md_assemble): Try pseudo-C syntax if an instruction cannot be parsed.
Diffstat (limited to 'gas/ChangeLog')
-rw-r--r--gas/ChangeLog32
1 files changed, 32 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 80548d2..e1cfcec 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,35 @@
+2023-04-20 Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
+
+ PR gas/29728
+ * config/tc-bpf.h (TC_EQUAL_IN_INSN): Define.
+ * config/tc-bpf.c (LEX_IS_SYMBOL_COMPONENT): Define.
+ (LEX_IS_WHITESPACE): Likewise.
+ (LEX_IS_NEWLINE): Likewise.
+ (LEX_IS_ARITHM_OP): Likewise.
+ (LEX_IS_STAR): Likewise.
+ (LEX_IS_CLSE_BR): Likewise.
+ (LEX_IS_OPEN_BR): Likewise.
+ (LEX_IS_EQUAL): Likewise.
+ (LEX_IS_EXCLA): Likewise.
+ (ST_EOI): Likewise.
+ (MAX_TOKEN_SZ): Likewise.
+ (init_pseudoc_lex): New function.
+ (md_begin): Call init_pseudoc_lex.
+ (valid_expr): New function.
+ (build_bpf_non_generic_load): Likewise.
+ (build_bpf_atomic_insn): Likewise.
+ (build_bpf_jmp_insn): Likewise.
+ (build_bpf_arithm_insn): Likewise.
+ (build_bpf_endianness): Likewise.
+ (build_bpf_load_store_insn): Likewise.
+ (look_for_reserved_word): Likewise.
+ (is_register): Likewise.
+ (is_cast): Likewise.
+ (get_token): Likewise.
+ (bpf_pseudoc_to_normal_syntax): Likewise.
+ (md_assemble): Try pseudo-C syntax if an instruction cannot be
+ parsed.
+
2023-04-18 mengqinggang <mengqinggang@loongson.cn>
* config/tc-loongarch.c (loongarch_fix_adjustable): Symbols with