Re: [PATCH 2/6] RISC-V Port: gcc

2017-02-06 Thread Palmer Dabbelt
On Sun, 05 Feb 2017 21:36:29 PST (-0800), san...@codesourcery.com wrote: > I didn't see a v3 with the documentation patches go by yet, and I had > some nit-picky comments on v2 (in addition to the ones Joseph already > asked for): No problem. > > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke

Re: [PATCH 2/6] RISC-V Port: gcc

2017-02-05 Thread Sandra Loosemore
I didn't see a v3 with the documentation patches go by yet, and I had some nit-picky comments on v2 (in addition to the ones Joseph already asked for): > diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 4b13aeb..581c4ef 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@

Re: [PATCH 2/6] RISC-V Port: gcc

2017-02-02 Thread Palmer Dabbelt
On Thu, 02 Feb 2017 10:08:27 PST (-0800), jos...@codesourcery.com wrote: > On Thu, 2 Feb 2017, Palmer Dabbelt wrote: > >> +@table @gcctabopt >> +@item -mbranch-cost=@var{N} >> +@opindex mbranch-cost >> +Set the cost of branches to roughly N instructions. > > @var{n} (both places; Texinfo may conver

Re: [PATCH 2/6] RISC-V Port: gcc

2017-02-02 Thread Palmer Dabbelt
On Thu, 02 Feb 2017 11:17:42 PST (-0800), mer...@debian.org wrote: > On Thu, Feb 02, 2017 at 01:05:13AM -0800, Palmer Dabbelt wrote: > >> diff --git a/gcc/doc/contrib.texi b/gcc/doc/contrib.texi >> index 5554d5f..5b14fc4 100644 >> --- a/gcc/doc/contrib.texi >> +++ b/gcc/doc/contrib.texi >> @@ -173,

Re: [PATCH 2/6] RISC-V Port: gcc

2017-02-02 Thread Joseph Myers
On Thu, 2 Feb 2017, Palmer Dabbelt wrote: > +@table @gcctabopt > +@item -mbranch-cost=@var{N} > +@opindex mbranch-cost > +Set the cost of branches to roughly N instructions. @var{n} (both places; Texinfo may convert to uppercase depending on the output format). > +@item -mplt > +@itemx -mno-plt

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-31 Thread Andrew Waterman
On Tue, Jan 31, 2017 at 10:32 AM, Richard Henderson wrote: > On 01/30/2017 05:10 PM, Andrew Waterman wrote: +(define_expand "clear_cache" + [(match_operand 0 "pmode_register_operand") + (match_operand 1 "pmode_register_operand")] + "" + " +{ + emit_insn (ge

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-31 Thread Richard Henderson
On 01/30/2017 05:10 PM, Andrew Waterman wrote: >>> +(define_expand "clear_cache" >>> + [(match_operand 0 "pmode_register_operand") >>> + (match_operand 1 "pmode_register_operand")] >>> + "" >>> + " >>> +{ >>> + emit_insn (gen_fence_i ()); >>> + DONE; >>> +}") >> >> >> Do you need a FENCE bef

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-30 Thread Andrew Waterman
On Fri, Jan 20, 2017 at 10:41 PM, Richard Henderson wrote: > On 01/11/2017 06:30 PM, Palmer Dabbelt wrote: >> >> +(define_register_constraint "f" "TARGET_HARD_FLOAT ? FP_REGS : NO_REGS" >> + "A floating-point register (if available).") >> + > > > I know this is the Traditional Way, but I do wonde

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-20 Thread Richard Henderson
On 01/17/2017 01:16 PM, Andrew Waterman wrote: We went with the /libXX/YY/ approach because, on a multilib system, the system libraries also need to be distinguished by ABI. It seemed most natural to us to handle ld.so and e.g. libc.so in a consistent manner. However, something along the lines

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-20 Thread Richard Henderson
On 01/11/2017 06:30 PM, Palmer Dabbelt wrote: +(define_register_constraint "f" "TARGET_HARD_FLOAT ? FP_REGS : NO_REGS" + "A floating-point register (if available).") + I know this is the Traditional Way, but I do wonder if using the new enable attribute on the alternatives would be better. N

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-17 Thread Andrew Waterman
On Tue, Jan 17, 2017 at 12:48 PM, Karsten Merker wrote: > On Mon, Jan 16, 2017 at 09:37:15PM -0800, Palmer Dabbelt wrote: >> On Sat, 14 Jan 2017 02:05:27 PST (-0800), mer...@debian.org wrote: >> > Palmer Dabbelt wrote: >> > >> >> diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h >>

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-16 Thread Palmer Dabbelt
On Sat, 14 Jan 2017 02:05:27 PST (-0800), mer...@debian.org wrote: > Palmer Dabbelt wrote: > >> diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h >> new file mode 100644 >> index 000..045f6cc >> --- /dev/null >> +++ b/gcc/config/riscv/linux.h >> [...] >> +#define GLIBC_DYNAMIC_L

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-14 Thread Joseph Myers
On Sat, 14 Jan 2017, Karsten Merker wrote: > So the actual ld.so binary should be called something like > "ld-linux-rv.so.1" instead of just "ld.so.1". With everything > else staying the same, that would give us a dynamic linker path > along the lines of "/lib64/lp64f/ld-linux-rv.so.1" for an RV64

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-14 Thread Karsten Merker
Palmer Dabbelt wrote: > diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h > new file mode 100644 > index 000..045f6cc > --- /dev/null > +++ b/gcc/config/riscv/linux.h > [...] > +#define GLIBC_DYNAMIC_LINKER "/lib" XLEN_SPEC "/" ABI_SPEC "/ld.so.1" [with XLEN_SPEC being either

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-13 Thread Andrew Waterman
On Thu, Jan 12, 2017 at 2:30 PM, Joseph Myers wrote: > On Wed, 11 Jan 2017, Palmer Dabbelt wrote: > >> +static void >> +riscv_parse_arch_string (const char *isa, int *flags) > > This should be passed the location from riscv_handle_option... > >> + error ("-march=%s: ISA string must begin with

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-12 Thread Joseph Myers
On Wed, 11 Jan 2017, Palmer Dabbelt wrote: > +static void > +riscv_parse_arch_string (const char *isa, int *flags) This should be passed the location from riscv_handle_option... > + error ("-march=%s: ISA string must begin with rv32 or rv64", isa); ... so you can use error_at with an expl