Re: [PATCH] libsanitizer: Replace memcpy with internal version in sanitizer_common

2024-01-17 Thread Daniel Cederman
On 2024-01-16 15:44, Jakub Jelinek wrote: On Tue, Jan 16, 2024 at 03:11:39PM +0100, Daniel Cederman wrote: When GCC is configured with --enable-target-optspace the compiler generates a memcpy call in the Symbolizer constructor in sanitizer_symbolizer.cpp when compiling for SPARC V8. Add

[PATCH] libsanitizer: Replace memcpy with internal version in sanitizer_common

2024-01-16 Thread Daniel Cederman
When GCC is configured with --enable-target-optspace the compiler generates a memcpy call in the Symbolizer constructor in sanitizer_symbolizer.cpp when compiling for SPARC V8. Add HAVE_AS_SYM_ASSIGN to replace it with a call to __sanitizer_internal_memcpy. libsanitizer/ChangeLog: * sanit

Re: [PATCH] sparc: Char arrays are 64-bit aligned on SPARC

2024-01-08 Thread Daniel Cederman
On 2024-01-08 10:20, Eric Botcazou wrote: pr88077 fails on SPARC since char HeaderStr[1] in pr88077_1.c and long HeaderStr in pr88077_0.c differs in alignment. warning: alignment 4 of normal symbol `HeaderStr' in c_lto_pr88077_0.o is smaller than 8 used by the common definition in c_lto_pr88077_

[PATCH] testsuite: Skip ifcvt-4.c for SPARC V8

2024-01-08 Thread Daniel Cederman
Conditional moves are not available in SPARC V8. gcc/testsuite/ChangeLog: * gcc.dg/ifcvt-4.c: Skip for SPARC V8 --- gcc/testsuite/gcc.dg/ifcvt-4.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/ifcvt-4.c b/gcc/testsuite/gcc.dg/ifcvt-4.c index 8b2583d00e92..99ed3

[PATCH 2/2] sparc: Add errata workaround to membar patterns

2024-01-04 Thread Daniel Cederman
LEON now uses the standard V8 membar patterns that contains an ldstub instruction. This instruction needs to be aligned properly when the GR712RC errata workaround is enabled. gcc/ChangeLog: * config/sparc/sparc.cc (atomic_insn_for_leon3_p): Treat membar_storeload as atomic * con

[PATCH] sparc: Treat instructions with length 0 as empty

2024-01-04 Thread Daniel Cederman
This is to handle the membar_empty instruction that can be generated when compiling for UT699. gcc/ChangeLog: * config/sparc/sparc.cc (next_active_non_empty_insn): Length 0 treated as empty --- gcc/config/sparc/sparc.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config/spar

[PATCH 1/2] sparc: Revert membar optimization that is not suitable for LEON5

2024-01-04 Thread Daniel Cederman
From: Andreas Larsson LEON5 has a deeper write-buffer and hence stb is not enough to flush a write out. For compatibility, use the default V8 approach for both LEON3 and LEON5. This reverts commit 49cc765db35a5a21cab2aece27a44983fa70b94b, "sync.md (*membar_storeload_leon3): New insn." gcc/Chang

[PATCH] sparc: Char arrays are 64-bit aligned on SPARC

2024-01-04 Thread Daniel Cederman
pr88077 fails on SPARC since char HeaderStr[1] in pr88077_1.c and long HeaderStr in pr88077_0.c differs in alignment. warning: alignment 4 of normal symbol `HeaderStr' in c_lto_pr88077_0.o is smaller than 8 used by the common definition in c_lto_pr88077_1.o gcc/testsuite/ChangeLog: * gcc

Re: [PATCH] sparc: Add scheduling information for LEON5

2021-09-15 Thread Daniel Cederman
Thank you for reviewing the patches! I will address your comments and push the patches after testing. Thanks again, Daniel On 2021-09-15 12:18, Eric Botcazou wrote: The LEON5 can often dual issue instructions from the same 64-bit aligned double word if there are no data dependencies. Add sched

[PATCH 4/4] sparc: Add NOP in stack_protect_setsi if sparc_fix_b2bst enabled

2021-09-15 Thread Daniel Cederman
This is needed to prevent the Store -> (Non-store or load) -> Store sequence. gcc/ChangeLog: * config/sparc/sparc.md: Add NOP to prevent sensitive sequence for B2BST errata workaround. --- gcc/config/sparc/sparc.md | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-)

[PATCH 3/4] sparc: Prevent atomic instructions in beginning of functions for UT700

2021-09-15 Thread Daniel Cederman
A call to the function might have a load instruction in the delay slot and a load followed by an atomic function could cause a deadlock. gcc/ChangeLog: * config/sparc/sparc.c (sparc_do_work_around_errata): Do not begin functions with atomic instruction in the UT700 errata workarou

[PATCH] sparc: Add scheduling information for LEON5

2021-09-15 Thread Daniel Cederman
The LEON5 can often dual issue instructions from the same 64-bit aligned double word if there are no data dependencies. Add scheduling information to avoid scheduling unpairable instructions back-to-back. gcc/ChangeLog: * config/sparc/sparc-opts.h (enum sparc_processor_type): Add LEON5

[PATCH 2/4] sparc: Skip all empty assembly statements

2021-09-15 Thread Daniel Cederman
This version detects multiple empty assembly statements in a row and also detects non-memory barrier empty assembly statements (__asm__("")). It can be used instead of next_active_insn(). gcc/ChangeLog: * config/sparc/sparc.c (next_active_non_empty_insn): New function that returns

[PATCH 1/4] sparc: Treat more instructions as load or store in errata workarounds

2021-09-15 Thread Daniel Cederman
Check the attribute of instruction to determine if it performs a store or load operation. This more generic approach sees the last instruction in the GOTdata_op model as a potential load and treats the memory barrier as a potential store instruction. gcc/ChangeLog: * config/sparc/sparc.c

[PATCH] sparc: Print out bit names for LEON and LEON3 with -mdebug

2021-09-15 Thread Daniel Cederman
From: Andreas Larsson gcc/ChangeLog: * config/sparc/sparc.c (dump_target_flag_bits): Print bit names for LEON and LEON3. --- gcc/config/sparc/sparc.c | 4 1 file changed, 4 insertions(+) diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 06f41d7bb53..d5

[PATCH] [SPARC] Make sure that jump is to a label in errata workaround

2017-12-11 Thread Daniel Cederman
reporting this to me. gcc/ChangeLog: 2017-12-11 Daniel Cederman * config/sparc/sparc.c (sparc_do_work_around_errata): Make sure the jump is to a label. --- gcc/config/sparc/sparc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/sparc/sparc.c b/gcc

Re: [PATCH 1/2] [SPARC] Prevent -mfix-ut699 from generating b2bst errata sequences

2017-12-05 Thread Daniel Cederman
But isn't that the change I already rejected back in July? You are right, that was a mistake from our side to submit it again. We had rediscovered the sequence using our scanning script and I forgot that the sequence was harmless in this case. We will update our scripts and revert the patch.

Re: [PATCH v2 3/4] [SPARC] Errata workaround for GRLIB-TN-0010

2017-12-04 Thread Daniel Cederman
Any particular reason to use MEM_P instead of mem_ref here? It looks like there is also a case for the b2bst workaround (only loads are concerned). No, there was no particular reason. mem_ref seems like a better choice if it detects more types of loads. /Daniel C

Re: [PATCH v2 1/4] [SPARC] Errata workaround for GRLIB-TN-0012

2017-11-28 Thread Daniel Cederman
...add (and (.) (not (eq_attr "branch_type" "icc")) to the first define_delay. Ah, OK, that makes more sense. I will submit an updated version. Thanks for getting back so quickly. Daniel C

[PATCH v3 1/4] [SPARC] Errata workaround for GRLIB-TN-0012

2017-11-28 Thread Daniel Cederman
floating-point operation or a floating-point branch. It is applicable to GR712RC. gcc/ChangeLog: 2017-11-17 Daniel Cederman * config/sparc/sparc.c (fpop_insn_p): New function. (sparc_do_work_around_errata): Insert NOP instructions to prevent sequences that could trigger

Re: [PATCH v2 4/4] [SPARC] Errata workaround for GRLIB-TN-0013

2017-11-27 Thread Daniel Cederman
+(and (eq_attr "fix_lost_divsqrt" "true") + (eq_attr "type" "fpdivs,fpsqrts,fpdivd,fpsqrtd")) + (const_string "false") These lines should also be added to the in_integer_branch_annul_delay attribute. /Daniel C

[PATCH 2/2] [SPARC] Recognize the load when accessing the GOT

2017-11-27 Thread Daniel Cederman
Needed for the UT699 errata workaround to function correctly when compiling with -fPIC. gcc/ChangeLog: 2017-11-27 Daniel Cederman * config/sparc/sparc.c (sparc_do_work_around_errata): Treat the movsi_pic_gotdata_op instruction as a load for the UT699 errata workaround

[PATCH 0/2] [SPARC] Fixes for UT699 errata workaround

2017-11-27 Thread Daniel Cederman
Hello, This patch series adds two fixes for the UT699 errata workaround. Daniel Cederman (2): [SPARC] Prevent -mfix-ut699 from generating b2bst errata sequences [SPARC] Recognize the load when accessing the GOT gcc/config/sparc/sparc.c | 8 +++- gcc/config/sparc/sparc.md | 8

[PATCH 1/2] [SPARC] Prevent -mfix-ut699 from generating b2bst errata sequences

2017-11-27 Thread Daniel Cederman
The sequence st fdivd / fsqrtd std was generated in some cases with -mfix-ut699 when there was a st before the div/sqrt. This sequence could trigger the b2bst errata. Now the following safe sequence is generated instead: st nop fdivd / fsqrtd std gcc/ChangeLog: 2017-11-27 Martin A

[PATCH v2 2/4] [SPARC] Errata workaround for GRLIB-TN-0011

2017-11-27 Thread Daniel Cederman
This patch provides a workaround for the errata described in GRLIB-TN-0011. If the workaround is enabled it will: * Insert .align 16 before atomic instructions (swap, ldstub, casa). It is applicable to GR712RC. gcc/ChangeLog: 2017-11-17 Daniel Cederman * config/sparc/sync.md

[PATCH v2 0/4] [SPARC] Workarounds for UT699, UT700, and GR712RC errata

2017-11-27 Thread Daniel Cederman
Hello Eric, Thank you for your comments! I have updated the patches and will commit them if you are OK with the changes. Daniel Cederman (4): [SPARC] Errata workaround for GRLIB-TN-0012 [SPARC] Errata workaround for GRLIB-TN-0011 [SPARC] Errata workaround for GRLIB-TN-0010 [SPARC] Errata

[PATCH v2 1/4] [SPARC] Errata workaround for GRLIB-TN-0012

2017-11-27 Thread Daniel Cederman
floating-point operation or a floating-point branch. It is applicable to GR712RC. gcc/ChangeLog: 2017-11-17 Daniel Cederman * config/sparc/sparc.c (fpop_insn_p): New function. (sparc_do_work_around_errata): Insert NOP instructions to prevent sequences that could trigger

[PATCH v2 4/4] [SPARC] Errata workaround for GRLIB-TN-0013

2017-11-27 Thread Daniel Cederman
0, and UT699. gcc/ChangeLog: 2017-11-17 Daniel Cederman * config/sparc/sparc.c (fpop_reg_depend_p): New function. (div_sqrt_insn_p): New function. (sparc_do_work_around_errata): Insert NOP instructions to prevent sequences that could trigger the TN-0013 erra

[PATCH v2 3/4] [SPARC] Errata workaround for GRLIB-TN-0010

2017-11-27 Thread Daniel Cederman
target. It is applicable to UT700. gcc/ChangeLog: 2017-11-17 Daniel Cederman * config/sparc/sparc.c (atomic_insn_p): New function. (sparc_do_work_around_errata): Insert NOP instructions to prevent sequences that could trigger the TN-0010 errata for UT700

[PATCH 3/4] [SPARC] Errata workaround for GRLIB-TN-0010

2017-11-20 Thread Daniel Cederman
target. It is applicable to UT700. gcc/ChangeLog: 2017-11-17 Daniel Cederman * config/sparc/sparc.c (atomic_insn_p): New function. (sparc_do_work_around_errata): Insert NOP instructions to prevent sequences that could trigger the TN-0010 errata for UT700

[PATCH 0/4] [SPARC] Workarounds for UT699, UT700, and GR712RC errata

2017-11-20 Thread Daniel Cederman
Daniel Cederman (4): [SPARC] Errata workaround for GRLIB-TN-0012 [SPARC] Errata workaround for GRLIB-TN-0011 [SPARC] Errata workaround for GRLIB-TN-0010 [SPARC] Errata workaround for GRLIB-TN-0013 gcc/config/sparc/sparc.c | 205 - gcc/config

[PATCH 4/4] [SPARC] Errata workaround for GRLIB-TN-0013

2017-11-20 Thread Daniel Cederman
0, and UT699. gcc/ChangeLog: 2017-11-17 Daniel Cederman * config/sparc/sparc.c (fpop_reg_depend_p): New function. (div_sqrt_insn_p): New function. (sparc_do_work_around_errata): Insert NOP instructions to prevent sequences that could trigger the TN-0013 erra

[PATCH 2/4] [SPARC] Errata workaround for GRLIB-TN-0011

2017-11-20 Thread Daniel Cederman
This patch provides a workaround for the errata described in GRLIB-TN-0011. If the workaround is enabled it will: * Insert .align 16 before atomic instructions (swap, ldstub, casa). It is applicable to GR712RC. gcc/ChangeLog: 2017-11-17 Daniel Cederman * config/sparc/sync.md

[PATCH 1/4] [SPARC] Errata workaround for GRLIB-TN-0012

2017-11-20 Thread Daniel Cederman
floating-point operation or a floating-point branch. It is applicable to GR712RC. gcc/ChangeLog: 2017-11-17 Daniel Cederman * config/sparc/sparc.c (fpop_insn_p): New function. (sparc_do_work_around_errata): Insert NOP instructions to prevent sequences that could trigger

[PATCH] [SPARC/RTEMS]: Add multilibs for LEON3FT back-to-back store workaround

2017-07-14 Thread Daniel Cederman
Replace MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED for readability. -mfix-gr712rc and -mfix-ut700 are currently equivalent. 2017-07-14 Daniel Cederman * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc

[PATCH] [SPARC] Avoid b2bst errata when using -mfix-ut699

2017-07-11 Thread Daniel Cederman
The errata fix for the UT699 fdivd and fsqrtd might cause a sequence that can trigger the b2bst errata. Adding a NOP prevents this. gcc/ChangeLog: 2017-07-11 Daniel Cederman * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back to back store errata sensitive sequence

Re: [PATCH-v4] [SPARC] Add a workaround for the LEON3FT store-store errata

2017-07-11 Thread Daniel Cederman
d later. OK to submit a new patch with only the second nop and a correct length attribute? -- Daniel Cederman Cobham Gaisler

Re: [PATCH-v3] [SPARC] Add a workaround for the LEON3FT store-store errata

2017-07-10 Thread Daniel Cederman
On 2017-07-07 18:04, Eric Botcazou wrote: Great! Would you mind to apply the patch for us? The only person here with write access just went on vacation. I have submitted a new version (v4) with the change that applies to both main and 7. OK, will do. Thanks! -- Daniel Cederman Cobham

Re: [PATCH-v3] [SPARC] Add a workaround for the LEON3FT store-store errata

2017-07-07 Thread Daniel Cederman
write access just went on vacation. I have submitted a new version (v4) with the change that applies to both main and 7. -- Daniel Cederman Cobham Gaisler

[PATCH-v4] [SPARC] Add a workaround for the LEON3FT store-store errata

2017-07-07 Thread Daniel Cederman
ion. gcc/ChangeLog: 2017-07-07 Daniel Cederman * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP instructions to prevent sequences that can trigger the store-store errata for certain LEON3FT processors. (sparc_option_override): -mfix-ut69

Re: [PATCH-v3] [SPARC] Add a workaround for the LEON3FT store-store errata

2017-07-04 Thread Daniel Cederman
On 2017-06-30 07:11, Sebastian Huber wrote: On 29/06/17 18:05, David Miller wrote: From: Daniel Cederman Date: Thu, 29 Jun 2017 17:15:43 +0200 I'm not thrilled with this, it's undocumented, the other workaround don't have it and I don't think that we really need i

Re: [PATCH-v3] [SPARC] Add a workaround for the LEON3FT store-store errata

2017-06-29 Thread Daniel Cederman
mmand line in conjunction with -mfix flag. But if more changes are required later on it would be good to have the define more closely tied to the flag to minimize the number of changes to Makefiles and etc. Would it be OK to add if we document it properly? -- Daniel Cederman Cobham Gaisler

[PATCH-v3] [SPARC] Add a workaround for the LEON3FT store-store errata

2017-06-27 Thread Daniel Cederman
ion. gcc/ChangeLog: 2017-06-21 Daniel Cederman * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP instructions to prevent sequences that can trigger the store-store errata for certain LEON3FT processors. (sparc_option_override): -mfix-ut69

Re: [PATCH] [SPARC] Add a workaround for the LEON3FT store-store errata

2017-06-27 Thread Daniel Cederman
preprocessor) when needed. But the implementation looks a bit strange, can't we merge the essentially identical blocks of code into a single block, as for the other fixes? I will submit a new version of the patch in which I have tried to remove the code duplication. -- Daniel Cederman C

[PATCH] [SPARC] Add a workaround for the LEON3FT store-store errata

2017-06-21 Thread Daniel Cederman
code when the flag is used. See GRLIB-TN-0009, "LEON3FT Stale Cache Entry After Store with Data Tag Parity Error", for more information. gcc/ChangeLog: 2017-06-21 Daniel Cederman * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP instructions to prevent

[PATCH] [SPARC] Add a workaround for the LEON3FT store-store errata

2017-06-14 Thread Daniel Cederman
"LEON3FT Stale Cache Entry After Store with Data Tag Parity Error", for more information. gcc/ChangeLog: 2017-01-18 Daniel Cederman * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP instructions to prevent sequences that can trigger the store-store

[PATCH 1/1] sparc32: Add a workaround for the LEON3FT store-store errata

2017-01-18 Thread Daniel Cederman
t; any single non-store/load instruction -> stb/sth/st/std The __FIX_B2BST define can be used to only enable workarounds in assembly code when the flag is used. See GRLIB-TN-0009, "LEON3FT Stale Cache Entry After Store with Data Tag Parity Error", for more information. gcc/ChangeLog:

Re: [PATCH] Do not use floating point registers when compiling with -msoft-float for SPARC

2015-07-07 Thread Daniel Cederman
without FPU. * config/sparc/sparc.md (untyped_call): Do not save %f0 for a target without FPU. (untyped_return): Do not load %f0 for a target without FPU. Understood. Thank you for looking at my patches and coming with improvements. -- Daniel Cederman

Re: [PATCH] Update instruction cost for LEON

2015-07-07 Thread Daniel Cederman
On 2015-07-07 12:37, Eric Botcazou wrote: 2015-07-03 Daniel Cederman * config/sparc/sparc.c (struct processor_costs): Set div cost for leon to match UT699 and AT697F. Set mul cost for leon3 to match standard leon3. So UT699 is not a standard LEON3? LEON3 exists

Re: [PATCH] save takes a single integer (register or 13-bit signed immediate)

2015-07-07 Thread Daniel Cederman
On 2015-07-07 12:35, Eric Botcazou wrote: 2015-06-26 Daniel Cederman * config/sparc/sparc.md: Window save takes a single integer This will probably break in 64-bit mode, the operand can be a DImode register. You are right, I forgot about that. Is there a mode one can use that

[PATCH] Update instruction cost for LEON

2015-07-03 Thread Daniel Cederman
gcc/ChangeLog: 2015-07-03 Daniel Cederman * config/sparc/sparc.c (struct processor_costs): Set div cost for leon to match UT699 and AT697F. Set mul cost for leon3 to match standard leon3. --- gcc/config/sparc/sparc.c | 8 1 file changed, 4 insertions(+), 4

[PATCH] Do not use floating point registers when compiling with -msoft-float for SPARC

2015-07-03 Thread Daniel Cederman
__builtin_apply* and __builtin_return accesses the floating point registers on SPARC even when compiling with -msoft-float. gcc/ChangeLog: 2015-06-26 Daniel Cederman * config/sparc/sparc.c (sparc_function_value_regno_p): Floating point registers cannot be used when

[PATCH] save takes a single integer (register or 13-bit signed immediate)

2015-07-03 Thread Daniel Cederman
This removes a warning about operand 0 missing mode gcc/ChangeLog: 2015-06-26 Daniel Cederman * config/sparc/sparc.md: Window save takes a single integer --- gcc/config/sparc/sparc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/sparc/sparc.md b/gcc

Re: [PATCH 2/2] Add leon3r0 and leon3r0v7 CPU targets

2015-07-03 Thread Daniel Cederman
One could add a -mtune-fpu switch. Did you look at other architectures in the GCC tree that would have similar requirements? Thank you for the suggestion about adding a -mtune-fpu switch. I have not yet looked at the other architectures, but will do so before proceeding. -- Daniel Cederman

Re: [PATCH 2/2] Add leon3r0 and leon3r0v7 CPU targets

2015-06-30 Thread Daniel Cederman
now about leon3, eveything is leon for them. Yes, that was a misunderstanding from my part. -- Daniel Cederman

Re: [PATCH 2/2] Add leon3r0 and leon3r0v7 CPU targets

2015-06-26 Thread Daniel Cederman
are represented by different targets in binutils. -- Daniel Cederman

Re: [PATCH] Make muser-mode the default for LEON3

2015-06-26 Thread Daniel Cederman
instruction with the user-mode ASI on these systems is not legal and will cause a trap. -- Daniel Cederman

[PATCH] Make muser-mode the default for LEON3

2015-06-23 Thread Daniel Cederman
The muser-mode flag causes the CASA instruction for LEON3 to use the user mode ASI. This is the correct behavior for almost all LEON3 targets. For this reason it makes sense to make user mode the default. gcc/ChangeLog: 2015-06-23 Daniel Cederman * config/sparc/sparc.opt: Rename mask

Re: [PATCH] Make muser-mode the default for LEON3

2015-06-23 Thread Daniel Cederman
On 2015-06-23 14:58, Jakub Jelinek wrote: On Tue, Jun 23, 2015 at 02:48:45PM +0200, Daniel Cederman wrote: How does one check if the bit has been explicitly set? It was not obvious to if (TARGET_USER_MODE_P (target_flags_explicit)) me, which is why I took a similar approach to a patch I

Re: [PATCH] Make muser-mode the default for LEON3

2015-06-23 Thread Daniel Cederman
On 2015-06-23 14:34, Jakub Jelinek wrote: On Tue, Jun 23, 2015 at 02:22:34PM +0200, Daniel Cederman wrote: The muser-mode flag causes the CASA instruction for LEON3 to use the user mode ASI. This is the correct behavior for almost all LEON3 targets. For this reason it makes sense to make user

[PATCH 2/2] Add leon3r0 and leon3r0v7 CPU targets

2015-06-23 Thread Daniel Cederman
Early variants of LEON3, revision 0, do not support the CASA instruction. This patch adds two new targets, leon3r0 and leon3r0v7, that are equivalent to leon3 and leon3v7, except that they do not support CASA. gcc/ChangeLog: 2015-06-22 Daniel Cederman * config.gcc: Add leon3r0[v7

[PATCH] Use leon3 target for native LEON on Linux

2015-06-23 Thread Daniel Cederman
Linux requires LEON version 3 or above with CASA support. gcc/ChangeLog: 2015-06-23 Daniel Cederman * config/sparc/driver-sparc.c: map /proc/cpuinfo with CPU LEON to leon3 --- gcc/config/sparc/driver-sparc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config

[PATCH] Make muser-mode the default for LEON3

2015-06-23 Thread Daniel Cederman
that requires CASA to use the supervisor ASI. gcc/ChangeLog: 2015-06-22 Daniel Cederman * config/sparc/sparc.opt: Add supervisor mode flag (-msv-mode) and make user mode the default * config/sparc/sync.md: Only use supervisor ASI for CASA when in supervisor

[PATCH 1/2] Add mask to specify which LEON3 targets support CASA

2015-06-23 Thread Daniel Cederman
Not all LEON3 support the CASA instruction. This patch provides a mask that can be used to specify which LEON3 targets that support CASA. gcc/ChangeLog: 2015-06-22 Daniel Cederman * config/sparc/sparc.c (sparc_option_override): Mark CPU targets leon3 and leon3v7 as

[PATCH] libatomic: Acquire locks in increasing order to avoid deadlocks

2014-09-14 Thread Daniel Cederman
operation will be compiled to bit operations. 2014-09-14 Daniel Cederman * libatomic/config/posix/lock.c (libat_lock_n): Acquire locks in increasing order to avoid deadlocks --- libatomic/config/posix/lock.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions

Re: [PATCH] Generate more efficient memory barriers for LEON3

2014-07-14 Thread Daniel Cederman
imply mean that the memory model of the LEON3 is Strong Consistency and not TSO? In which case, the only thing to change is the default setting for LEON3 in sparc_option_override. -- Daniel Cederman

[PATCH-v3] Generate more efficient memory barriers for LEON3

2014-07-11 Thread Daniel Cederman
ChangeLog: 2014-07-11 Daniel Cederman gcc/config/sparc/ * sync.md: Generate more efficient memory barriers for LEON3 --- gcc/config/sparc/sync.md | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/config/sparc/sync.md b/gcc/config/sparc/sync.md index

Re: [PATCH] Generate more efficient memory barriers for LEON3

2014-07-11 Thread Daniel Cederman
That was an error on my side. The wrong memory model had gotten cached in a generated make script. Lets drop membar_leon3 also then :) On 2014-07-11 11:15, Eric Botcazou wrote: The full barrier pattern membar_leon3 also gets generated so I think that one should be kept also. Do you have a tes

[PATCH-v2] Generate more efficient memory barriers for LEON3

2014-07-11 Thread Daniel Cederman
ChangeLog: 2014-07-11 Daniel Cederman gcc/config/sparc/ * sync.md: Generate more efficient memory barriers for LEON3 --- gcc/config/sparc/sync.md | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/gcc/config/sparc/sync.md b/gcc/config/sparc

Re: [PATCH] Generate more efficient memory barriers for LEON3

2014-07-11 Thread Daniel Cederman
he new pattern is not "multi", it's "store" and you need to add: && !TARGET_LEON3 to the original membar_storeload since TARGET_LEON3 is also TARGET_V8. -- Daniel Cederman Software Engineer Aeroflex Gaisler AB Aeroflex Microelectronic Solutions – HiRel Kungsgatan 12 SE-411 19 Gothenburg, Sweden Phone: +46 31 7758665 ceder...@gaisler.com www.Aeroflex.com/Gaisler

[PATCH] Generate more efficient memory barriers for LEON3

2014-06-25 Thread Daniel Cederman
uot;, and StoreLoad can be achieved with a normal byte write "stb", instead of an atomic byte read-write "ldstub". The provided patch changes the previously mentioned memory barriers for TARGET_LEON3. Best regards, Daniel Cederman ChangeLog: 2014-06-25 Danie