From d4b51b8ba058a79d9ef64cd03a3bc88d2c7fc6c6 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Wed, 1 Nov 2017 17:54:40 +0000 Subject: [PATCH] RISC-V: Document the medlow and medany code models This documentation is patterned off the aarch64 -mcmodel documentation. gcc/ChangeLog: 2017-11-01 Palmer Dabbelt * doc/invoke.texi (RISC-V Options): Explicitly name the medlow and medany code models, and describe what they do. From-SVN: r254321 --- gcc/ChangeLog | 5 +++++ gcc/doc/invoke.texi | 17 +++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index adf8cf308e9..8ec5295c8a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-11-01 Palmer Dabbelt + + * doc/invoke.texi (RISC-V Options): Explicitly name the medlow + and medany code models, and describe what they do. + 2017-11-01 Richard Sandiford Revert accidental duplicate: diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 43acbcbbcd7..8903afaeeff 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -989,7 +989,7 @@ See RS/6000 and PowerPC Options. -msmall-data-limit=@var{N-bytes} @gol -msave-restore -mno-save-restore @gol -mstrict-align -mno-strict-align @gol --mcmodel=@var{code-model} @gol +-mcmodel=medlow -mcmodel=medany @gol -mexplicit-relocs -mno-explicit-relocs @gol} @emph{RL78 Options} @@ -21765,9 +21765,18 @@ Use smaller but slower prologue and epilogue code. @opindex mstrict-align Do not generate unaligned memory accesses. -@item -mcmodel=@var{code-model} -@opindex mcmodel -Specify the code model. +@item -mcmodel=medlow +@opindex mcmodel=medlow +Generate code for the medium-low code model. The program and its statically +defined symbols must lie within a single 2 GiB address range and must lie +between absolute addresses -2 GiB and +2 GiB. Programs can be statically or +dynamically linked. This is the default code model. + +@item -mcmodel=medany +@opindex mcmodel=medany +Generate code for the medium-any code model. The program and its statically +defined symbols must be within any single 2 GiB address range. Programs can be +statically or dynamically linked. @end table -- 2.30.2