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

2015-06-30 Thread Eric Botcazou
For all LEON3 (with CASA support) the CASA instruction works in supervisor-mode regardless of ASI used. In user-mode CASA only works with the user-mode ASI. So CASA with user-mode ASI works for both user-mode and supervisor-mode. By having user-mode ASI as default, one would not need to

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

2015-06-26 Thread Eric Botcazou
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. Do they lack the CASA instruction with supervisor-mode ASI? What happens when the CASA instruction with user-mode ASI is executed in supervisor mode?

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

2015-06-26 Thread Daniel Cederman
Do they lack the CASA instruction with supervisor-mode ASI? What happens when the CASA instruction with user-mode ASI is executed in supervisor mode? For all LEON3 (with CASA support) the CASA instruction works in supervisor-mode regardless of ASI used. In user-mode CASA only works with

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

2015-06-23 Thread Sebastian Huber
Instead of introducing a new option which may conflict with an existing one, is it not possible to simply use -mno-user-mode? On 23/06/15 14:22, 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

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

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 Jakub Jelinek
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 mode the default. This patch adds a flag

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

2015-06-23 Thread Jakub Jelinek
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 found for another CPU target. If it is possible