Re: [PATCH] C-SKY: Fix wrong ld name with option -mfloat-abi=hard.

2020-09-16 Thread Cooper Qu via Gcc-patches

Approved.

Thanks,

Cooper

On 9/16/20 11:28 AM, Jojo R wrote:

gcc/ChangeLog:

* config/csky/csky-linux-elf.h (GLIBC_DYNAMIC_LINKER): Use mfloat-abi.

---
  gcc/config/csky/csky-linux-elf.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/csky/csky-linux-elf.h b/gcc/config/csky/csky-linux-elf.h
index 9a57dd04..cf587ae 100644
--- a/gcc/config/csky/csky-linux-elf.h
+++ b/gcc/config/csky/csky-linux-elf.h
@@ -63,7 +63,7 @@
%{mvdsp:-mvdsp} \
"
  
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-cskyv2%{mhard-float:-hf}%{mbig-endian:-be}.so.1"

+#define GLIBC_DYNAMIC_LINKER 
"/lib/ld-linux-cskyv2%{mfloat-abi=hard:-hf}%{mbig-endian:-be}.so.1"
  
  #define LINUX_TARGET_LINK_SPEC	"%{h*} %{version:-v}		\

 %{b}   \


Re: [PATCH 3/3] C-SKY: Refine target name for elf target test

2020-09-16 Thread Cooper Qu via Gcc-patches

All of the three pathes have been pushed to trunk.


Thanks,

Cooper


On 9/16/20 6:34 PM, Jojo R wrote:

gcc/testsuite/ChangeLog:

* lib/target-supports.exp (check_profiling_available): Refine name of 
elf target.

---
  gcc/testsuite/lib/target-supports.exp | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 6881b66..60f76db 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -698,7 +698,7 @@ proc check_profiling_available { test_what } {
 || [istarget avr-*-*]
 || [istarget bfin-*-*]
 || [istarget cris-*-*]
-|| [istarget csky-*-elf]
+|| [istarget csky-*-elf*]
 || [istarget fido-*-elf]
 || [istarget h8300-*-*]
 || [istarget lm32-*-*]


Re: [PATCH] C-SKY: Add -msim option

2020-09-17 Thread Cooper Qu via Gcc-patches

It looks good to me. Approved.


Thanks,

Cooper


On 9/16/20 7:47 PM, Jojo R wrote:

gcc/ChangeLog:

* config/csky/csky.opt (msim): New.
* doc/invoke.texi (C-SKY Options): Document -msim.
* config/csky/csky-elf.h (LIB_SPEC): Add simulator runtime.

---
  gcc/config/csky/csky-elf.h | 10 --
  gcc/config/csky/csky.opt   |  4 
  gcc/doc/invoke.texi|  7 ++-
  3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/gcc/config/csky/csky-elf.h b/gcc/config/csky/csky-elf.h
index 15a0e73..a79d757 100644
--- a/gcc/config/csky/csky-elf.h
+++ b/gcc/config/csky/csky-elf.h
@@ -70,8 +70,14 @@
   %{EL:-EL} -X"
  
  #undef	LIB_SPEC

-#define LIB_SPEC \
-  "%{pthread:-lpthread} -lc %{mccrt:-lcc-rt}"
+#define LIB_SPEC "\
+%{pthread:-lpthread} \
+--start-group \
+-lc \
+%{msim:-lsemi}%{!msim:-lnosys} \
+--end-group \
+%{mccrt:-lcc-rt} \
+"
  /* FIXME add this to LIB_SPEC when need */
  /*   %{!shared:%{profile:-lc_p}%{!profile:-lc}}" */
  
diff --git a/gcc/config/csky/csky.opt b/gcc/config/csky/csky.opt

index 60b51e5..505a764 100644
--- a/gcc/config/csky/csky.opt
+++ b/gcc/config/csky/csky.opt
@@ -192,3 +192,7 @@ Set the branch costs to roughly the specified number of 
instructions.
  msched-prolog
  Target Report Var(flag_sched_prolog) Init(0)
  Permit scheduling of function prologue and epilogue sequences.
+
+msim
+Target
+Use the simulator runtime.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6d9ff2c..9176c83 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -829,7 +829,7 @@ Objective-C and Objective-C++ Dialects}.
  -mdsp  -medsp  -mvdsp @gol
  -mdiv  -msmart  -mhigh-registers  -manchor @gol
  -mpushpop  -mmultiple-stld  -mconstpool  -mstack-size  -mccrt @gol
--mbranch-cost=@var{n}  -mcse-cc  -msched-prolog}
+-mbranch-cost=@var{n}  -mcse-cc  -msched-prolog -msim}
  
  @emph{Darwin Options}

  @gccoptlist{-all_load  -allowable_client  -arch  -arch_errors_fatal @gol
@@ -20835,6 +20835,11 @@ this option can result in code that is not compliant 
with the C-SKY V2 ABI
  prologue requirements and that cannot be debugged or backtraced.
  It is disabled by default.
  
+@item -msim

+@opindex msim
+Links the library libsemi.a which is in compatible with simulator. Applicable
+to ELF compiler only.
+
  @end table
  
  @node Darwin Options


Re: [PATCH 4/4] C-SKY: Separate FRAME_POINTER_REGNUM into FRAME_POINTER_REGNUM and HARD_FRAME_POINTER_REGNUM.

2021-05-24 Thread Cooper Qu via Gcc-patches

These four patches has been merged.

On 5/24/21 8:22 PM, Geng Qi wrote:

gcc/ChangeLog:

* config/csky/csky.h
(FRAME_POINTER_REGNUM): Use HARD_FRAME_POINTER_REGNUM and
FRAME_POINTER_REGNUM instead of the signle definition. The
signle definition may not work well at simplify_subreg_regno().
(ELIMINABLE_REGS): Add for HARD_FRAME_POINTER_REGNUM.
* config/csky/csky.c (get_csky_live_regs, csky_can_eliminate,
csky_initial_elimination_offset, csky_expand_prologue,
csky_expand_epilogue): Add for HARD_FRAME_POINTER_REGNUM.
---
  gcc/config/csky/csky.c | 15 +--
  gcc/config/csky/csky.h |  7 +--
  2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c
index 1a6cfd7..7f2af82 100644
--- a/gcc/config/csky/csky.c
+++ b/gcc/config/csky/csky.c
@@ -1751,12 +1751,12 @@ get_csky_live_regs (int *count)
save = true;
  
/* Frame pointer marked used.  */

-  else if (frame_pointer_needed && reg == FRAME_POINTER_REGNUM)
+  else if (frame_pointer_needed && reg == HARD_FRAME_POINTER_REGNUM)
save = true;
  
/* This is required for CK801/802 where FP is a fixed reg, otherwise

 we end up with no FP value available to the DWARF-2 unwinder.  */
-  else if (crtl->calls_eh_return && reg == FRAME_POINTER_REGNUM)
+  else if (crtl->calls_eh_return && reg == HARD_FRAME_POINTER_REGNUM)
save = true;
  
/* CK801/802 also need special handling for LR because it's clobbered

@@ -1832,6 +1832,8 @@ csky_layout_stack_frame (void)
  static bool
  csky_can_eliminate (const int from ATTRIBUTE_UNUSED, const int to)
  {
+  if (to == FRAME_POINTER_REGNUM)
+return from != ARG_POINTER_REGNUM;
if (to == STACK_POINTER_REGNUM)
  return !frame_pointer_needed;
return true;
@@ -1852,6 +1854,7 @@ csky_initial_elimination_offset (int from, int to)
switch (from)
  {
  case FRAME_POINTER_REGNUM:
+case HARD_FRAME_POINTER_REGNUM:
offset = cfun->machine->reg_offset;
break;
  
@@ -1866,7 +1869,7 @@ csky_initial_elimination_offset (int from, int to)

/* If we are asked for the offset to the frame pointer instead,
   then subtract the difference between the frame pointer and stack
   pointer.  */
-  if (to == FRAME_POINTER_REGNUM)
+  if (to == FRAME_POINTER_REGNUM || to == HARD_FRAME_POINTER_REGNUM)
  offset -= cfun->machine->reg_offset;
return offset;
  }
@@ -5785,7 +5788,7 @@ csky_expand_prologue (void)
   of the register save area.  */
if (frame_pointer_needed)
  {
-  insn = emit_insn (gen_movsi (frame_pointer_rtx, stack_pointer_rtx));
+  insn = emit_insn (gen_movsi (hard_frame_pointer_rtx, stack_pointer_rtx));
RTX_FRAME_RELATED_P (insn) = 1;
  }
  
@@ -5848,7 +5851,7 @@ csky_expand_epilogue (void)

/* Restore the SP to the base of the register save area.  */
if (frame_pointer_needed)
  {
-  insn = emit_move_insn (stack_pointer_rtx, frame_pointer_rtx);
+  insn = emit_move_insn (stack_pointer_rtx, hard_frame_pointer_rtx);
RTX_FRAME_RELATED_P (insn) = 1;
  }
else
@@ -6004,7 +6007,7 @@ csky_set_eh_return_address (rtx source, rtx scratch)
  
if (frame_pointer_needed)

{
- basereg = frame_pointer_rtx;
+ basereg = hard_frame_pointer_rtx;
  delta = 0;
}
else
diff --git a/gcc/config/csky/csky.h b/gcc/config/csky/csky.h
index 1fd72d0..f2b0d1c 100644
--- a/gcc/config/csky/csky.h
+++ b/gcc/config/csky/csky.h
@@ -342,7 +342,8 @@ extern int csky_arch_isa_features[];
  #define STACK_POINTER_REGNUM  CSKY_SP_REGNUM
  
  /* Base register for access to local variables of the function.  */

-#define FRAME_POINTER_REGNUM  8
+#define FRAME_POINTER_REGNUM  36
+#define HARD_FRAME_POINTER_REGNUM  8
  
  /* Base register for access to arguments of the function.  This is a fake

 register that is always eliminated.  */
@@ -370,7 +371,9 @@ extern int csky_arch_isa_features[];
  #define ELIMINABLE_REGS \
  {{ ARG_POINTER_REGNUM,  STACK_POINTER_REGNUM},\
   { ARG_POINTER_REGNUM,  FRAME_POINTER_REGNUM},\
- { FRAME_POINTER_REGNUM,  STACK_POINTER_REGNUM   }}
+ { ARG_POINTER_REGNUM,   HARD_FRAME_POINTER_REGNUM   },\
+ { FRAME_POINTER_REGNUM,  STACK_POINTER_REGNUM   },\
+ { FRAME_POINTER_REGNUM,  HARD_FRAME_POINTER_REGNUM  }}
  
  /* Define the offset between two registers, one to be eliminated, and the

 other its replacement, at the start of a routine.  */


Re: [PATCH] C-SKY: Add insn "ldbs".

2021-05-24 Thread Cooper Qu via Gcc-patches

Hi Geng Qi,

Could you add a test case for this patch?


On 4/30/21 9:00 PM, Geng Qi wrote:

gcc/ChangeLog:

config/csky/csky.md (cskyv2_sextend_ldbs): New insn.
---
  gcc/config/csky/csky.md | 10 ++
  1 file changed, 10 insertions(+)

diff --git a/gcc/config/csky/csky.md b/gcc/config/csky/csky.md
index c27d627..b980d4c 100644
--- a/gcc/config/csky/csky.md
+++ b/gcc/config/csky/csky.md
@@ -1533,6 +1533,7 @@
}"
  )
  
+;; hi -> si

  (define_insn "extendhisi2"
[(set (match_operand:SI   0 "register_operand" "=r")
(sign_extend:SI (match_operand:HI 1 "register_operand" "r")))]
@@ -1557,6 +1558,15 @@
"sextb  %0, %1"
  )
  
+(define_insn "*cskyv2_sextend_ldbs"

+  [(set (match_operand:SI0 "register_operand" "=r")
+(sign_extend:SI (match_operand:QI 1 "csky_simple_mem_operand" "m")))]
+  "CSKY_ISA_FEATURE (E2)"
+  "ld.bs\t%0, %1"
+  [(set_attr "length" "4")
+   (set_attr "type" "load")]
+)
+
  ;; qi -> hi
  (define_insn "extendqihi2"
[(set (match_operand:HI   0 "register_operand" "=r")


Re: [PATCH] C-SKY: Cases for csky fpuv3 instructions.

2021-05-25 Thread Cooper Qu via Gcc-patches
Merged. And one thing to note is that the file path should be written in 
relative way. For example, gcc/testsuite/gcc.target/csky/fpuv3/fpuv3.exp 
should be  written as gcc.target/csky/fpuv3/fpuv3.exp.


On 4/30/21 9:01 PM, Geng Qi wrote:

gcc/testsuite/ChangeLog:

* gcc/testsuite/gcc.target/csky/fpuv3/fpuv3.exp: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_div.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fadd.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fdtos.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fftoi_rm.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fftoi_rz.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fhtos.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fitof.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fmov.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fmovi.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fmula.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fmuls.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fneg.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fnmula.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fnmuls.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fstod.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fstoh.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fsub.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fxtof.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_h.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_hs.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_hsz.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_hz.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_ls.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_lsz.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_lt.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_ltz.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_max.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_min.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_mul.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_mula.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_muls.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_ne.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_nez.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_recip.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_sqrt.c: New.
* gcc/testsuite/gcc.target/csky/fpuv3/fpv3_unordered.c: New.
---
  gcc/testsuite/gcc.target/csky/fpuv3/fpuv3.exp  | 50 +++
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_div.c | 15 
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fadd.c| 23 ++
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fdtos.c   | 11 +++
  .../gcc.target/csky/fpuv3/fpv3_fftoi_rm.c  | 55 +
  .../gcc.target/csky/fpuv3/fpv3_fftoi_rz.c  | 41 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fhtos.c   | 11 +++
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fitof.c   | 72 
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fmov.c| 96 ++
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fmovi.c   | 31 +++
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fmula.c   | 23 ++
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fmuls.c   | 23 ++
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fneg.c| 22 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fnmula.c  | 14 
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fnmuls.c  | 14 
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fstod.c   | 11 +++
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fstoh.c   | 11 +++
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fsub.c| 23 ++
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_fxtof.c   | 76 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_h.c   | 20 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_hs.c  | 19 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_hsz.c | 21 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_hz.c  | 20 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_ls.c  | 19 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_lsz.c | 20 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_lt.c  | 19 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_ltz.c | 20 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_max.c | 16 
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_min.c | 16 
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_mul.c | 15 
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_mula.c| 16 
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_muls.c| 16 
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_ne.c  | 19 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_nez.c | 21 +
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_recip.c   | 14 
  gcc/testsuite/gcc.target/csky/fpuv3/fpv3_sqrt.c| 16 
  .../

Re: [PATCH] C-SKY: Add insn "ldbs".

2021-05-25 Thread Cooper Qu via Gcc-patches

merged.

On 5/25/21 6:45 PM, Geng Qi wrote:

gcc/
* config/csky/csky.md (cskyv2_sextend_ldbs): New insn.

gcc/testsuite/
* gcc/testsuite/gcc.target/csky/ldbs.c: New.
---
  gcc/config/csky/csky.md  | 10 ++
  gcc/testsuite/gcc.target/csky/ldbs.c | 11 +++
  2 files changed, 21 insertions(+)
  create mode 100644 gcc/testsuite/gcc.target/csky/ldbs.c

diff --git a/gcc/config/csky/csky.md b/gcc/config/csky/csky.md
index c27d627..b980d4c 100644
--- a/gcc/config/csky/csky.md
+++ b/gcc/config/csky/csky.md
@@ -1533,6 +1533,7 @@
}"
  )
  
+;; hi -> si

  (define_insn "extendhisi2"
[(set (match_operand:SI   0 "register_operand" "=r")
(sign_extend:SI (match_operand:HI 1 "register_operand" "r")))]
@@ -1557,6 +1558,15 @@
"sextb  %0, %1"
  )
  
+(define_insn "*cskyv2_sextend_ldbs"

+  [(set (match_operand:SI0 "register_operand" "=r")
+(sign_extend:SI (match_operand:QI 1 "csky_simple_mem_operand" "m")))]
+  "CSKY_ISA_FEATURE (E2)"
+  "ld.bs\t%0, %1"
+  [(set_attr "length" "4")
+   (set_attr "type" "load")]
+)
+
  ;; qi -> hi
  (define_insn "extendqihi2"
[(set (match_operand:HI   0 "register_operand" "=r")
diff --git a/gcc/testsuite/gcc.target/csky/ldbs.c 
b/gcc/testsuite/gcc.target/csky/ldbs.c
new file mode 100644
index 000..27a0254
--- /dev/null
+++ b/gcc/testsuite/gcc.target/csky/ldbs.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=ck801" "-march=ck801" } { "*" } } */
+/* { dg-csky-options "-O1" } */
+
+int foo (signed char *pb)
+{
+  return *pb;
+}
+
+/* { dg-final { scan-assembler "ld.bs" } } */
+


Re: [PATCH] C-SKY: Support for fpuv2:fldrd/fstrd and fpuv3:fldr.64/fstr.64.

2021-05-25 Thread Cooper Qu via Gcc-patches

Is any test case for these instructions?

On 4/30/21 9:04 PM, Geng Qi wrote:

gcc/ChangeLog:

* config/csky/csky.c (ck810_legitimate_index_p): Modified for
support "base + index" with DF mode.
* config/csky/constraints.md ("Y"): New constraint for memory operands
without index register.
* config/csky/csky_insn_fpuv2.md
(fpuv3_movdf):At constraints, use "Y" instead of "m" where mov between
memory and general registers, and put them baskwards.
* config/csky/csky_insn_fpuv3.md
(fpuv2_movdf): Likewise.
---
  gcc/config/csky/constraints.md |  4 
  gcc/config/csky/csky.c |  3 ++-
  gcc/config/csky/csky_insn_fpuv2.md |  4 ++--
  gcc/config/csky/csky_insn_fpuv3.md | 16 
  4 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/gcc/config/csky/constraints.md b/gcc/config/csky/constraints.md
index c9bc9f2..2641ab3 100644
--- a/gcc/config/csky/constraints.md
+++ b/gcc/config/csky/constraints.md
@@ -38,6 +38,10 @@
"Memory operands with base register, index register"
(match_test "csky_valid_mem_constraint_operand (op, \"W\")"))
  
+(define_memory_constraint "Y"

+  "Memory operands without index register"
+  (not (match_test "csky_valid_mem_constraint_operand (op, \"W\")")))
+
  (define_constraint "R"
"Memory operands whose address is a label_ref"
(and (match_code "mem")
diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c
index e4c92fe..e55821f 100644
--- a/gcc/config/csky/csky.c
+++ b/gcc/config/csky/csky.c
@@ -3136,7 +3136,8 @@ ck810_legitimate_index_p (machine_mode mode, rtx index, 
int strict_p)
/* The follow index is for ldr instruction, the ldr cannot
   load dword data, so the mode size should not be larger than
   4.  */
-  else if (GET_MODE_SIZE (mode) <= 4)
+  else if (GET_MODE_SIZE (mode) <= 4
+  || (TARGET_HARD_FLOAT && CSKY_VREG_MODE_P (mode)))
  {
if (is_csky_address_register_rtx_p (index, strict_p))
return 1;
diff --git a/gcc/config/csky/csky_insn_fpuv2.md 
b/gcc/config/csky/csky_insn_fpuv2.md
index 0a680f8..5a06b22 100644
--- a/gcc/config/csky/csky_insn_fpuv2.md
+++ b/gcc/config/csky/csky_insn_fpuv2.md
@@ -461,8 +461,8 @@
  )
  
  (define_insn "*fpuv2_movdf"

-  [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r, r,m, v,?r,Q,v,v,v")
-   (match_operand:DF 1 "general_operand"  " r,m,mF,r,?r, v,v,Q,v,m"))]
+  [(set (match_operand:DF 0 "nonimmediate_operand" "=r, v,?r,Q,v,v,v,r, r,Y")
+   (match_operand:DF 1 "general_operand"  " r,?r, v,v,Q,v,m,Y,YF,r"))]
"CSKY_ISA_FEATURE (fpv2_df)"
"* return csky_output_movedouble(operands, DFmode);"
[(set (attr "length")
diff --git a/gcc/config/csky/csky_insn_fpuv3.md 
b/gcc/config/csky/csky_insn_fpuv3.md
index 053673c..7849795 100644
--- a/gcc/config/csky/csky_insn_fpuv3.md
+++ b/gcc/config/csky/csky_insn_fpuv3.md
@@ -71,27 +71,27 @@
  )
  
  (define_insn "*fpv3_movdf"

-  [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r, r,m,v,?r,Q,v,v,v, v")
-   (match_operand:DF 1 "general_operand"  " 
r,m,mF,r,?r,v,v,Q,v,m,Dv"))]
+  [(set (match_operand:DF 0 "nonimmediate_operand" "=r, v,?r,Q,v,v,v, v,r, 
r,Y")
+   (match_operand:DF 1 "general_operand"  " r,?r, 
v,v,Q,v,m,Dv,Y,YF,r"))]
"CSKY_ISA_FEATURE(fpv3_df)"
"*
switch (which_alternative)
  {
-case 4:
+case 1:
if (TARGET_BIG_ENDIAN)
return \"fmtvr.64\\t%0, %R1, %1\";
return \"fmtvr.64\\t%0, %1, %R1\";
-case 5:
+case 2:
if (TARGET_BIG_ENDIAN)
return \"fmfvr.64\\t%R0, %0, %1\";
return \"fmfvr.64\\t%0, %R0, %1\";
+case 3:
+case 4:
  case 6:
-case 7:
-case 9:
return fpuv3_output_move(operands);
-case 8:
+case 5:
return \"fmov.64\\t%0, %1\";
-case 10:
+case 7:
return \"fmovi.64\\t%0, %1\";
  default:
return csky_output_movedouble(operands, DFmode);


Re: [PATCH] C-SKY: Support fpuv2:fldrd/fstrd and fpuv3:fldr.64/fstr.64.

2021-05-25 Thread Cooper Qu via Gcc-patches

Pushed

On 5/26/21 11:29 AM, Geng Qi wrote:

gcc/ChangeLog:

* config/csky/csky.c (ck810_legitimate_index_p): Modified for
support "base + index" with DF mode.
* config/csky/constraints.md ("Y"): New constraint for memory operands
without index register.
* config/csky/csky_insn_fpuv2.md
(fpuv3_movdf):At constraints, use "Y" instead of "m" where mov between
memory and general registers, and put them baskwards.
* config/csky/csky_insn_fpuv3.md
(fpuv2_movdf): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/csky/fldrd_fstrd.c: New.
* gcc.target/csky/fpuv3/fldr64_fstr64.c: New.
---
  gcc/config/csky/constraints.md  |  4 
  gcc/config/csky/csky.c  |  3 ++-
  gcc/config/csky/csky_insn_fpuv2.md  |  4 ++--
  gcc/config/csky/csky_insn_fpuv3.md  | 16 
  gcc/testsuite/gcc.target/csky/fldrd_fstrd.c | 17 +
  gcc/testsuite/gcc.target/csky/fpuv3/fldr64_fstr64.c | 18 ++
  6 files changed, 51 insertions(+), 11 deletions(-)
  create mode 100644 gcc/testsuite/gcc.target/csky/fldrd_fstrd.c
  create mode 100644 gcc/testsuite/gcc.target/csky/fpuv3/fldr64_fstr64.c

diff --git a/gcc/config/csky/constraints.md b/gcc/config/csky/constraints.md
index c9bc9f2..2641ab3 100644
--- a/gcc/config/csky/constraints.md
+++ b/gcc/config/csky/constraints.md
@@ -38,6 +38,10 @@
"Memory operands with base register, index register"
(match_test "csky_valid_mem_constraint_operand (op, \"W\")"))
  
+(define_memory_constraint "Y"

+  "Memory operands without index register"
+  (not (match_test "csky_valid_mem_constraint_operand (op, \"W\")")))
+
  (define_constraint "R"
"Memory operands whose address is a label_ref"
(and (match_code "mem")
diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c
index e4c92fe..e55821f 100644
--- a/gcc/config/csky/csky.c
+++ b/gcc/config/csky/csky.c
@@ -3136,7 +3136,8 @@ ck810_legitimate_index_p (machine_mode mode, rtx index, 
int strict_p)
/* The follow index is for ldr instruction, the ldr cannot
   load dword data, so the mode size should not be larger than
   4.  */
-  else if (GET_MODE_SIZE (mode) <= 4)
+  else if (GET_MODE_SIZE (mode) <= 4
+  || (TARGET_HARD_FLOAT && CSKY_VREG_MODE_P (mode)))
  {
if (is_csky_address_register_rtx_p (index, strict_p))
return 1;
diff --git a/gcc/config/csky/csky_insn_fpuv2.md 
b/gcc/config/csky/csky_insn_fpuv2.md
index 0a680f8..5a06b22 100644
--- a/gcc/config/csky/csky_insn_fpuv2.md
+++ b/gcc/config/csky/csky_insn_fpuv2.md
@@ -461,8 +461,8 @@
  )
  
  (define_insn "*fpuv2_movdf"

-  [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r, r,m, v,?r,Q,v,v,v")
-   (match_operand:DF 1 "general_operand"  " r,m,mF,r,?r, v,v,Q,v,m"))]
+  [(set (match_operand:DF 0 "nonimmediate_operand" "=r, v,?r,Q,v,v,v,r, r,Y")
+   (match_operand:DF 1 "general_operand"  " r,?r, v,v,Q,v,m,Y,YF,r"))]
"CSKY_ISA_FEATURE (fpv2_df)"
"* return csky_output_movedouble(operands, DFmode);"
[(set (attr "length")
diff --git a/gcc/config/csky/csky_insn_fpuv3.md 
b/gcc/config/csky/csky_insn_fpuv3.md
index 053673c..7849795 100644
--- a/gcc/config/csky/csky_insn_fpuv3.md
+++ b/gcc/config/csky/csky_insn_fpuv3.md
@@ -71,27 +71,27 @@
  )
  
  (define_insn "*fpv3_movdf"

-  [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r, r,m,v,?r,Q,v,v,v, v")
-   (match_operand:DF 1 "general_operand"  " 
r,m,mF,r,?r,v,v,Q,v,m,Dv"))]
+  [(set (match_operand:DF 0 "nonimmediate_operand" "=r, v,?r,Q,v,v,v, v,r, 
r,Y")
+   (match_operand:DF 1 "general_operand"  " r,?r, 
v,v,Q,v,m,Dv,Y,YF,r"))]
"CSKY_ISA_FEATURE(fpv3_df)"
"*
switch (which_alternative)
  {
-case 4:
+case 1:
if (TARGET_BIG_ENDIAN)
return \"fmtvr.64\\t%0, %R1, %1\";
return \"fmtvr.64\\t%0, %1, %R1\";
-case 5:
+case 2:
if (TARGET_BIG_ENDIAN)
return \"fmfvr.64\\t%R0, %0, %1\";
return \"fmfvr.64\\t%0, %R0, %1\";
+case 3:
+case 4:
  case 6:
-case 7:
-case 9:
return fpuv3_output_move(operands);
-case 8:
+case 5:
return \"fmov.64\\t%0, %1\";
-case 10:
+case 7:
return \"fmovi.64\\t%0, %1\";
  default:
return csky_output_movedouble(operands, DFmode);
diff --git a/gcc/testsuite/gcc.target/csky/fldrd_fstrd.c 
b/gcc/testsuite/gcc.target/csky/fldrd_fstrd.c
new file mode 100644
index 000..024de18
--- /dev/null
+++ b/gcc/testsuite/gcc.target/csky/fldrd_fstrd.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-csky-options "-mcpu=ck810f -O1 -mhard-float" } */
+
+double fldrd (double *pd, int index)
+{
+  return pd[index];
+}
+
+/* { dg-final { scan-assembler "fldrd" } } */
+
+void fstrd (double *pd, int index, double d)
+{
+  pd[index] = d;
+}
+
+/* { dg-final { scan-assembler "fstrd" } } */
+
diff --git a/gcc

Re: [PATCH] C-SKY: Fix for gcc.dg/torture/stackalign/builtin-return-2.c.

2021-05-25 Thread Cooper Qu via Gcc-patches

Pushed.

On 4/30/21 9:02 PM, Geng Qi wrote:

gcc/ChangeLog:

* config/csky/csky.md (untyped_call): Emit clobber for return
registers to mark them used.
---
  gcc/config/csky/csky.md | 4 
  1 file changed, 4 insertions(+)

diff --git a/gcc/config/csky/csky.md b/gcc/config/csky/csky.md
index b980d4c..f91d851 100644
--- a/gcc/config/csky/csky.md
+++ b/gcc/config/csky/csky.md
@@ -3258,6 +3258,10 @@
  
emit_call_insn (gen_call (operands[0], const0_rtx));
  
+  for (int i = 0; i < XVECLEN (operands[2], 0); i++)

+emit_clobber (SET_SRC (XVECEXP (operands[2], 0, i)));
+  emit_insn (gen_blockage ());
+
for (i = 0; i < XVECLEN (operands[2], 0); i++)
  {
rtx set = XVECEXP (operands[2], 0, i);


Re: [PATCH] C-SKY: Use default for TARGET_PROMOTE_PROTOTYPES.

2021-05-25 Thread Cooper Qu via Gcc-patches

Pushed.

On 4/30/21 9:03 PM, Geng Qi wrote:

gcc/ChangeLog:

* config/csky/csky.c (TARGET_PROMOTE_PROTOTYPES): Use default.
---
  gcc/config/csky/csky.c | 3 ---
  1 file changed, 3 deletions(-)

diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c
index 67cdf9c..e4c92fe 100644
--- a/gcc/config/csky/csky.c
+++ b/gcc/config/csky/csky.c
@@ -512,9 +512,6 @@ csky_cpu_cpp_builtins (cpp_reader *pfile)
  #undefTARGET_SPLIT_COMPLEX_ARG
  #define TARGET_SPLIT_COMPLEX_ARG hook_bool_const_tree_true
  
-#undef	TARGET_PROMOTE_PROTOTYPES

-#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
-
  #undefTARGET_MUST_PASS_IN_STACK
  #define TARGET_MUST_PASS_IN_STACK must_pass_in_stack_var_size
  


Re: [PATCH] C-SKY: Use default for TARGET_CAN_CHANGE_MODE_CLASS.

2021-05-26 Thread Cooper Qu via Gcc-patches

merged.


On 4/30/21 9:02 PM, Geng Qi wrote:

gcc/ChangeLog:

* config/csky/csky.c (csky_can_change_mode_class): Delete.
For csky, HF/SF mode use the low bits of VREGS.
---
  gcc/config/csky/csky.c | 16 
  1 file changed, 16 deletions(-)

diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c
index 7f2af82..67cdf9c 100644
--- a/gcc/config/csky/csky.c
+++ b/gcc/config/csky/csky.c
@@ -611,9 +611,6 @@ csky_default_logical_op_non_short_circuit (void)
  #undef TARGET_MODES_TIEABLE_P
  #define TARGET_MODES_TIEABLE_P csky_modes_tieable_p
  
-#undef TARGET_CAN_CHANGE_MODE_CLASS

-#define TARGET_CAN_CHANGE_MODE_CLASS csky_can_change_mode_class
-
  #undefTARGET_CONDITIONAL_REGISTER_USAGE
  #define TARGET_CONDITIONAL_REGISTER_USAGE csky_conditional_register_usage
  
@@ -2373,19 +2370,6 @@ csky_modes_tieable_p (machine_mode mode1, machine_mode mode2)

   && (mode1 == DFmode || mode2 == DFmode));
  }
  
-/* Implement TARGET_CAN_CHANGE_MODE_CLASS.

-   V_REG registers can't do subreg as all values are reformatted to
-   internal precision.  */
-
-static bool
-csky_can_change_mode_class (machine_mode from,
-   machine_mode to,
-   reg_class_t rclass)
-{
-  return (GET_MODE_SIZE (from) == GET_MODE_SIZE (to)
- || !reg_classes_intersect_p (V_REGS, rclass));
-}
-
  /* Implement TARGET_CLASS_LIKELY_SPILLED_P.
 We need to define this for MINI_REGS when we only use r0 - r7.
 Otherwise we can end up using r0-r4 for function arguments, and don't


Re: [PATCH v2] C-SKY: Support -mfloat-abi=hard.

2020-08-17 Thread Cooper Qu via Gcc-patches

Hi Jojo,

Nowhere is this rule directly stated. But there are indent options 
showed in 
https://www.gnu.org/prep/standards/html_node/Formatting.html#Formatting 
corresponding to recommendations of C formatting style, which use the 
defualt 8 clumns tab wide.



On 8/18/20 9:42 AM, Jojo R wrote:

Hi,

Is there coding rule with it ?

I can not find it from 
https://www.gnu.org/prep/standards/html_node/index.html
and https://gcc.gnu.org/codingconventions.html

Could you give me any hints ?

Thanks.

Jojo
在 2020年8月17日 +0800 PM11:05,Xianmiao Qu ,写道:

Hi Jojo,


On 8/17/20 7:09 PM, Jojo R wrote:

diff --git a/gcc/config/csky/csky.c b/gcc/config/csky/csky.c
index 7ba3ed3..b71291a 100644
--- a/gcc/config/csky/csky.c
+++ b/gcc/config/csky/csky.c
@@ -328,6 +328,16 @@ csky_cpu_cpp_builtins (cpp_reader *pfile)
{
builtin_define ("__csky_hard_float__");
builtin_define ("__CSKY_HARD_FLOAT__");
+ if (TARGET_HARD_FLOAT_ABI)
+ {
+ builtin_define ("__csky_hard_float_abi__");
+ builtin_define ("__CSKY_HARD_FLOAT_ABI__");
+ }
+ if (TARGET_SINGLE_FPU)
+ {
+ builtin_define ("__csky_hard_float_fpu_sf__");
+ builtin_define ("__CSKY_HARD_FLOAT_FPU_SF__");
+ }
}

These is one more thing you shoud pay attention to, if the spaces number
reaches 8 at begining of a line, you should use tab instead of 8 spaces.


Thanks,

Xianmiao


Re: [PATCH v2] [RISC-V] Add support for TLS stack protector canary access

2020-07-29 Thread Cooper Qu via Gcc-patches
Sorry for later replay, I will add testcases on a following patch if the 
patch is accepted.



Regards,

Cooper

On 2020/7/28 上午9:23, Kito Cheng wrote:

Add testcase later is OK to me.

On Tue, Jul 28, 2020 at 6:55 AM Jim Wilson  wrote:

On Sun, Jul 19, 2020 at 7:04 PM cooper  wrote:

Ping

On 2020/7/13 下午4:15, cooper wrote:

gcc/
   * config/riscv/riscv-opts.h (stack_protector_guard): New enum.
   * config/riscv/riscv.c (riscv_option_override): Handle
   the new options.
   * config/riscv/riscv.md (stack_protect_set): New pattern to handle
   flexible stack protector guard settings.
   (stack_protect_set_): Ditto.
   (stack_protect_test): Ditto.
   (stack_protect_test_): Ditto.
   * config/riscv/riscv.opt (mstack-protector-guard=,
   mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
   options.
   * doc/invoke.texi (Option Summary) [RISC-V Options]:
   Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
   -mstack-protector-guard-offset=.
   (RISC-V Options): Ditto.

The v2 patch looks fine to me.  Meanwhile, Kito asked for testcases
which would be nice to have but I don't think is critical considering
that this has already been tested with a kernel build.  Maybe the
testcases can be a follow on patch?  I'd like to see forward movement
on this, even if we accept a patch without the testcases.

Jim


[PATCH] [csky] Delete big endian CPUs' mutilib for linux gcc.

2020-07-29 Thread Cooper Qu via Gcc-patches
gcc/
* config/csky/t-csky-linux: Delete big endian CPUs' multilib.

---
 gcc/config/csky/t-csky-linux | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/gcc/config/csky/t-csky-linux b/gcc/config/csky/t-csky-linux
index 16656c3..df471ed 100644
--- a/gcc/config/csky/t-csky-linux
+++ b/gcc/config/csky/t-csky-linux
@@ -20,14 +20,8 @@
 # .
 
 
-# Endiannesses.
-MULTILIB_OPTIONS = mlittle-endian/mbig-endian
-MULTILIB_DIRNAMES= little big
-MULTILIB_MATCHES = mlittle-endian=EL
-MULTILIB_MATCHES = mbig-endian=EB
-
 MULTILIB_EXCEPTIONS  =
-CSKY_MULTILIB_OSDIRNAMES = mbig-endian=/big mlittle-endian=/. 
mhard-float=/hard-fp msoft-float=/. mcpu.ck810f=/. mcpu.ck807f=/ck807
+CSKY_MULTILIB_OSDIRNAMES = mhard-float=/hard-fp msoft-float=/. mcpu.ck810f=/. 
mcpu.ck807f=/ck807
 
 # Arch variants.
 MULTILIB_OPTIONS += mcpu=ck810f/mcpu=ck807f
-- 
2.7.4



Re: [PATCH 1/7] C-SKY: Add fpuv3 instructions and CK860 arch

2020-10-29 Thread Cooper Qu via Gcc-patches

Hi gengqi,

I could not find the patchs [3/7], [4/7] and [7/7]. Could you check the 
emails and send them again ?



On 10/29/20 9:22 PM, gengqi via Gcc-patches wrote:

gcc/ChangeLog:

* config/csky/constraints.md ("W"): New constriant for mem operand
with base reg, index register.
("Q"): Renamed and modified "csky_valid_fpuv2_mem_operand" to
"csky_valid_mem_constraint_operand" to deal with both "Q" and "W"
constraint.
("Dv"): New constraint for const double value that can be used at
fmovi instruction.
* config/csky/csky-modes.def (HFmode): New mode.
* config/csky/csky-protos.h (csky_valid_fpuv2_mem_operand): Rename
to "csky_valid_mem_constraint_operand" and new support for constraint
"W".
(get_output_csky_movedouble_length): New.
(fpuv3_output_move): New.
(fpuv3_const_double): New.
* config/csky/csky.c (csky_option_override): New arch CK860 with fpv3.
(decompose_csky_address): Robustness adjust.
(csky_print_operand): New "CONST_DOUBLE" operand.
(csky_output_move): New support for fpv3 instructions.
(get_output_csky_movedouble_length): New.
(fpuv3_output_move): New.
(fpuv3_const_double): New.
(csky_emit_compare): New cover for float comparsion.
(csky_emit_compare_float): Refine.
(csky_vaild_fpuv2_mem_operand): Rename to
"csky_valid_mem_constraint_operand" and new support for constraint "W".
(ck860_rtx_costs): New.
(csky_rtx_costs): New subcall for CK860.
(regno_reg_class): New vregs for fpuv3.
(csky_dbx_regno): Likewise.
(csky_cpu_cpp_builtins): New builtin macro for fpuv3.
(csky_conditional_register_usage): New suporrot for fpuv3.
(csky_dwarf_register_span): New suporrot for fpuv3.
(csky_init_builtins, csky_mangle_type): New support for "__fp16" type.
(ck810_legitimate_index_p): New support for fp16.
* gcc/config/csky/csky.h (TARGET_TLS): ADD CK860.
(CSKY_VREG_P, CSKY_VREG_LO_P, CSKY_VREG_HI_P): New support for fpuv3.
(TARGET_SINGLE_FPU): New support for fpuv3.
(TARGET_SUPPORT_FPV3): New macro.
(FIRST_PSEUDO_REGISTER): Value change, since the new fpuv3 regs.
(FIXED_REGISTERS, CALL_REALLY_USED_REGISTERS, REGISTER_NAMES,
 REG_CLASS_CONTENTS): Support for fpuv3.
* gcc/config/csky/csky.md (movsf): Move to cksy_insn_fpu.md and adjust.
(csky_movsf_fpv2): Likewise.
(ck801_movsf): Likewise.
(csky_movsf): Likewise.
(movdf): Likewise.
(csky_movdf_fpv2): Likewise.
(ck801_movdf): Likewise.
(csky_movdf): Likewise.
(movsicc): Refine. Use "comparison_operatior" instead of
"ordered_comparison_operatior".
(addsicc): Likewise.
(CSKY_FIRST_VFP3_REGNUM, CSKY_LAST_VFP3_REGNUM): New constant.
(call_value_internal_vh): New insn.
* config/csky/csky_cores.def (CK860): New arch and cpu.
(fpv3): New 4 fpus: fpv3_hf, fpv3_hsf, fpv3_sdf and fpv3.
* config/csky/csky_insn_fpu.md (mov): Move the float mov
patterns from csky.md here.
(fpuv2 instructions): Refactor. Separate all float patterns into
emit-patterns and match-patterns, remain the emit-patterns here, and
move the match-patterns to csky_insn_fpuv2.md.
(fpuv3 instructions): Add patterns and fuse part of them with the
fpuv2's.
* config/csky/csky_insn_fpuv2.md: New file for fpuv2 instructions.
* config/csky/csky_insn_fpuv3.md: New flie and new patterns for fpuv3
isntructions.
* config/csky/csky_isa.def (fcr): New.
(fpv3): New 4 isa sets: fpv3_hi, fpv3_hf, fpv3_sf and fpv3_df.
(CK860): New definition for ck860.
* gcc/config/csky/csky_tables.opt (ck860): New processors ck860,
ck860f. And new arch ck860.
(fpv3): New 4 fpus: fpv3_hf, fpv3_hsf, fpv3_sdf and fpv3.
* config/csky/predicates.md (csky_float_comparsion_operator): Delete
"geu", "gtu", "leu", "ltu", which will never appear at float comparison.
* config/cksy/t-csky-elf, config/csky/t-csky-linux: New for ck860.
* doc/md.texi: Add "Q" and "W" constraints for C-SKY.
---
  gcc/config/csky/constraints.md |  13 +-
  gcc/config/csky/csky-modes.def |   2 +
  gcc/config/csky/csky-protos.h  |   7 +-
  gcc/config/csky/csky.c | 650 ++
  gcc/config/csky/csky.h | 162 ++--
  gcc/config/csky/csky.md| 127 ++
  gcc/config/csky/csky_cores.def |  13 +
  gcc/config/csky/csky_insn_fpu.md   | 798 +++--
  gcc/config/csky/csky_insn_fpuv2.md | 470 ++
  gcc/config/csky/csky_insn_fpuv3.md | 506 +++
  gcc/config/csky/csky_isa.def   |  15 +
  gcc/config/csky/csky_tables.opt|  21 +
  gcc/config/c

Re: [committed] C-SKY: Define SYSROOT_SUFFIX_SPEC.

2023-01-25 Thread Cooper Qu via Gcc-patches
On Fri, Jan 20, 2023 at 05:27:26PM +, Joseph Myers wrote:

> I think this caused the build failures with build-many-glibcs.py shown by 
> my bot.  SYSROOT_SUFFIX_SPEC should not be defined for a 
> --disable-multilib build; in such a build you can expect a single sysroot 
> without a suffix involved.  Thus, you should put the SYSROOT_SUFFIX_SPEC 
> definition in a separate header only used if test "x${enable_multilib}" = 
> xyes (as in the config.gcc code removed in the older patch you refer to 
> above), or something similar.
> 

Hi Joseph,

Sorry, this is indeed caused by this patch. I tested the multilib scenario, but 
I didn't test the non-multilib, so I didn't find this problem in time.
Now I have fixed this problem, the patch can be seen in
  https://gcc.gnu.org/pipermail/gcc-patches/2023-January/610534.html
Hope it also works for you, If you still have problems, please contact me.



Thanks,
Cooper