aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2015-03-31 12:12:30 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2015-03-31 12:13:35 -0700
commit43ace1f171bf10c5a3dfe996c2c4a9fce6f22b5f (patch)
tree56f0ab49069d7d18d1328b3cdabeede2571f559a /gcc
parent66499ff8055467f13da270f8ef009b8539f9da23 (diff)
downloadriscv-gnu-toolchain-43ace1f171bf10c5a3dfe996c2c4a9fce6f22b5f.zip
riscv-gnu-toolchain-43ace1f171bf10c5a3dfe996c2c4a9fce6f22b5f.tar.gz
riscv-gnu-toolchain-43ace1f171bf10c5a3dfe996c2c4a9fce6f22b5f.tar.bz2
gcc: allow subtargets to override default code model
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gcc/config/riscv/riscv.c2
-rw-r--r--gcc/gcc/config/riscv/riscv.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gcc/config/riscv/riscv.c b/gcc/gcc/config/riscv/riscv.c
index 734ac26..b5ca060 100644
--- a/gcc/gcc/config/riscv/riscv.c
+++ b/gcc/gcc/config/riscv/riscv.c
@@ -108,7 +108,7 @@ enum riscv_address_type {
ADDRESS_SYMBOLIC
};
-enum riscv_code_model riscv_cmodel = CM_MEDLOW;
+enum riscv_code_model riscv_cmodel = TARGET_DEFAULT_CMODEL;
/* Macros to create an enumeration identifier for a function prototype. */
#define RISCV_FTYPE_NAME1(A, B) RISCV_##A##_FTYPE_##B
diff --git a/gcc/gcc/config/riscv/riscv.h b/gcc/gcc/config/riscv/riscv.h
index c0eefeb..2405450 100644
--- a/gcc/gcc/config/riscv/riscv.h
+++ b/gcc/gcc/config/riscv/riscv.h
@@ -198,6 +198,8 @@ along with GCC; see the file COPYING3. If not see
#define SUBTARGET_EXTRA_SPECS
#endif
+#define TARGET_DEFAULT_CMODEL CM_MEDLOW
+
/* By default, turn on GDB extensions. */
#define DEFAULT_GDB_EXTENSIONS 1