aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-riscv.h
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2016-12-18 22:53:51 -0800
committerAlan Modra <amodra@gmail.com>2016-12-20 12:26:34 +1030
commitd115ab8eee9bb3e13aae86698a4fd91e0ed284e9 (patch)
tree2bafebe38f0795731928a456d08d68d21286c72b /gas/config/tc-riscv.h
parent2922d21da14b4711872371abacb16e8ab7c70894 (diff)
downloadfsf-binutils-gdb-d115ab8eee9bb3e13aae86698a4fd91e0ed284e9.zip
fsf-binutils-gdb-d115ab8eee9bb3e13aae86698a4fd91e0ed284e9.tar.gz
fsf-binutils-gdb-d115ab8eee9bb3e13aae86698a4fd91e0ed284e9.tar.bz2
Don't define RISC-V .p2align
* config/tc-riscv.c (riscv_pseudo_table): Remove "align", "p2align", and "balign". (s_align): Remove. (riscv_handle_align): New function. (riscv_frag_align_code): Likewise. (riscv_make_nops): Likewise. * config/tc-riscv.h (MAX_MEM_FOR_RS_ALIGN_CODE): Change to 7. (HANDLE_ALIGN): Define. (md_do_align): Define. (riscv_handle_align): Declare. (riscv_frag_align_code): Likewise.
Diffstat (limited to 'gas/config/tc-riscv.h')
-rw-r--r--gas/config/tc-riscv.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/gas/config/tc-riscv.h b/gas/config/tc-riscv.h
index 5e07fda..5d6b83f 100644
--- a/gas/config/tc-riscv.h
+++ b/gas/config/tc-riscv.h
@@ -48,8 +48,18 @@ extern int riscv_relax_frag (asection *, struct frag *, long);
#define md_undefined_symbol(name) (0)
#define md_operand(x)
-/* FIXME: it is unclear if this is used, or if it is even correct. */
-#define MAX_MEM_FOR_RS_ALIGN_CODE (1 + 2)
+extern bfd_boolean riscv_frag_align_code (int);
+#define md_do_align(N, FILL, LEN, MAX, LABEL) \
+ if ((N) != 0 && !(FILL) && !need_pass_2 && subseg_text_p (now_seg)) \
+ { \
+ if (riscv_frag_align_code (N)) \
+ goto LABEL; \
+ }
+
+extern void riscv_handle_align (fragS *);
+#define HANDLE_ALIGN riscv_handle_align
+
+#define MAX_MEM_FOR_RS_ALIGN_CODE 7
/* The ISA of the target may change based on command-line arguments. */
#define TARGET_FORMAT riscv_target_format()