aboutsummaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libc/machine/riscv/strcmp.S9
1 files changed, 8 insertions, 1 deletions
diff --git a/newlib/libc/machine/riscv/strcmp.S b/newlib/libc/machine/riscv/strcmp.S
index 12c39db..cc29b7b 100644
--- a/newlib/libc/machine/riscv/strcmp.S
+++ b/newlib/libc/machine/riscv/strcmp.S
@@ -188,9 +188,16 @@ strcmp:
foundnull 1 3
foundnull 2 3
#endif
+#ifdef __riscv_cmodel_large
+ # Put the data within the funciton for large code model to prevent
+ # the data put too far.
+.align 3
+mask:
+.dword 0x7f7f7f7f7f7f7f7f
+#endif
.size strcmp, .-strcmp
-#if SZREG == 8
+#if SZREG == 8 && !defined(__riscv_cmodel_large)
.section .srodata.cst8,"aM",@progbits,8
.align 3
mask: