summaryrefslogtreecommitdiff
path: root/gas/config/tc-riscv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-riscv.c')
-rw-r--r--gas/config/tc-riscv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
index 189e40d11c7..f4276c9fb5e 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;