diff options
author | kan <kan@FreeBSD.org> | 2003-11-07 02:43:04 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-11-07 02:43:04 +0000 |
commit | 1f79a7c5d02f19d3b84a4c966a52df954df090ec (patch) | |
tree | fe235f72e674c6a360d502ea52089d3d6f2035e2 /contrib/gcc/config/sparc | |
parent | 81a2c9c441dc3231499d48ad9c0871b075ef6aa0 (diff) | |
parent | b09448931ae541a7a60fd1cf0ebac14b627fba69 (diff) | |
download | FreeBSD-src-1f79a7c5d02f19d3b84a4c966a52df954df090ec.zip FreeBSD-src-1f79a7c5d02f19d3b84a4c966a52df954df090ec.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r122180,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/gcc/config/sparc')
-rw-r--r-- | contrib/gcc/config/sparc/linux.h | 4 | ||||
-rw-r--r-- | contrib/gcc/config/sparc/linux64.h | 4 | ||||
-rw-r--r-- | contrib/gcc/config/sparc/sol2-c1.asm | 4 | ||||
-rw-r--r-- | contrib/gcc/config/sparc/sparc.c | 4 | ||||
-rw-r--r-- | contrib/gcc/config/sparc/sparc.md | 41 |
5 files changed, 49 insertions, 8 deletions
diff --git a/contrib/gcc/config/sparc/linux.h b/contrib/gcc/config/sparc/linux.h index ea16b7eed..e4bd7bb 100644 --- a/contrib/gcc/config/sparc/linux.h +++ b/contrib/gcc/config/sparc/linux.h @@ -256,6 +256,10 @@ do { \ #undef CTORS_SECTION_ASM_OP #undef DTORS_SECTION_ASM_OP +#undef LINK_GCC_C_SEQUENCE_SPEC +#define LINK_GCC_C_SEQUENCE_SPEC \ + "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" + /* Do code reading to identify a signal frame, and set the frame state data appropriately. See unwind-dw2.c for the structs. */ diff --git a/contrib/gcc/config/sparc/linux64.h b/contrib/gcc/config/sparc/linux64.h index 8fd3a1f..27be1d1 100644 --- a/contrib/gcc/config/sparc/linux64.h +++ b/contrib/gcc/config/sparc/linux64.h @@ -319,6 +319,10 @@ do { \ #undef CTORS_SECTION_ASM_OP #undef DTORS_SECTION_ASM_OP +#undef LINK_GCC_C_SEQUENCE_SPEC +#define LINK_GCC_C_SEQUENCE_SPEC \ + "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" + /* Do code reading to identify a signal frame, and set the frame state data appropriately. See unwind-dw2.c for the structs. */ diff --git a/contrib/gcc/config/sparc/sol2-c1.asm b/contrib/gcc/config/sparc/sol2-c1.asm index 894a8c3..a1cc68d 100644 --- a/contrib/gcc/config/sparc/sol2-c1.asm +++ b/contrib/gcc/config/sparc/sol2-c1.asm @@ -92,6 +92,10 @@ _start: ! access those data anyway. Instead, go straight to main: mov %l0, %o0 ! argc mov %l1, %o1 ! argv +#ifdef GCRT1 + setn(___Argv, %o4, %o3) + stn %o1, [%o3] ! *___Argv +#endif ! Skip argc words past argv, to env: sll %l0, CPTRSHIFT, %o2 add %o2, CPTRSIZE, %o2 diff --git a/contrib/gcc/config/sparc/sparc.c b/contrib/gcc/config/sparc/sparc.c index 5b03f05..79022b4 100644 --- a/contrib/gcc/config/sparc/sparc.c +++ b/contrib/gcc/config/sparc/sparc.c @@ -8028,6 +8028,10 @@ sparc_v8plus_shift (operands, insn, opcode) if (which_alternative != 2) operands[3] = operands[0]; + /* We can only shift by constants <= 63. */ + if (GET_CODE (operands[2]) == CONST_INT) + operands[2] = GEN_INT (INTVAL (operands[2]) & 0x3f); + if (GET_CODE (operands[1]) == CONST_INT) { output_asm_insn ("mov\t%1, %3", operands); diff --git a/contrib/gcc/config/sparc/sparc.md b/contrib/gcc/config/sparc/sparc.md index ebe9d2b..b53013e 100644 --- a/contrib/gcc/config/sparc/sparc.md +++ b/contrib/gcc/config/sparc/sparc.md @@ -148,8 +148,12 @@ (eq_attr "branch_type" "fcc") (if_then_else (match_operand 0 "fcc0_reg_operand" "") (if_then_else (eq_attr "empty_delay_slot" "true") - (const_int 2) - (const_int 1)) + (if_then_else (eq (symbol_ref "TARGET_V9") (const_int 0)) + (const_int 3) + (const_int 2)) + (if_then_else (eq (symbol_ref "TARGET_V9") (const_int 0)) + (const_int 2) + (const_int 1))) (if_then_else (lt (pc) (match_dup 2)) (if_then_else (lt (minus (match_dup 2) (pc)) (const_int 260000)) (if_then_else (eq_attr "empty_delay_slot" "true") @@ -6881,6 +6885,8 @@ { if (operands[2] == const1_rtx) return "add\t%1, %1, %0"; + if (GET_CODE (operands[2]) == CONST_INT) + operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f); return "sll\t%1, %2, %0"; } [(set (attr "type") @@ -6910,6 +6916,8 @@ { if (operands[2] == const1_rtx) return "add\t%1, %1, %0"; + if (GET_CODE (operands[2]) == CONST_INT) + operands[2] = GEN_INT (INTVAL (operands[2]) & 0x3f); return "sllx\t%1, %2, %0"; } [(set (attr "type") @@ -6969,7 +6977,11 @@ (ashiftrt:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "" - "sra\t%1, %2, %0" + { + if (GET_CODE (operands[2]) == CONST_INT) + operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f); + return "sra\t%1, %2, %0"; + } [(set_attr "type" "shift")]) (define_insn "*ashrsi3_extend" @@ -7016,12 +7028,17 @@ } }) -(define_insn "" +(define_insn "*ashrdi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (ashiftrt:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64" - "srax\t%1, %2, %0" + + { + if (GET_CODE (operands[2]) == CONST_INT) + operands[2] = GEN_INT (INTVAL (operands[2]) & 0x3f); + return "srax\t%1, %2, %0"; + } [(set_attr "type" "shift")]) ;; XXX @@ -7040,7 +7057,11 @@ (lshiftrt:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "" - "srl\t%1, %2, %0" + { + if (GET_CODE (operands[2]) == CONST_INT) + operands[2] = GEN_INT (INTVAL (operands[2]) & 0x1f); + return "srl\t%1, %2, %0"; + } [(set_attr "type" "shift")]) ;; This handles the case where @@ -7097,12 +7118,16 @@ } }) -(define_insn "" +(define_insn "*lshrdi3_sp64" [(set (match_operand:DI 0 "register_operand" "=r") (lshiftrt:DI (match_operand:DI 1 "register_operand" "r") (match_operand:SI 2 "arith_operand" "rI")))] "TARGET_ARCH64" - "srlx\t%1, %2, %0" + { + if (GET_CODE (operands[2]) == CONST_INT) + operands[2] = GEN_INT (INTVAL (operands[2]) & 0x3f); + return "srlx\t%1, %2, %0"; + } [(set_attr "type" "shift")]) ;; XXX |