diff --git a/gas/ChangeLog b/gas/ChangeLog index f095421ee6..bb1aa01da9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2017-10-23 Palmer Dabbelt + + * config/tc-riscv.c (riscv_frag_align_code): Align code by 4 + bytes on non-RVC systems. + 2017-10-23 Maciej W. Rozycki * config/tc-mips.c (mips_elf_final_processing): Don't set diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index 189e40d11c..f4276c9fb5 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -2277,7 +2277,7 @@ bfd_boolean riscv_frag_align_code (int n) { bfd_vma bytes = (bfd_vma) 1 << n; - bfd_vma worst_case_bytes = bytes - 2; + bfd_vma worst_case_bytes = bytes - (riscv_opts.rvc ? 2 : 4); char *nops = frag_more (worst_case_bytes); expressionS ex;