summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/sparc/syscall/syscall.S (follow)
Commit message (Collapse)AuthorAgeFilesLines
* sparc: Move libcpu content to cpukitSebastian Huber2018-03-131-295/+0
| | | | | | This patch is a part of the BSP source reorganization. Update #3285.
* sparc: Add lazy floating point switchSebastian Huber2017-07-251-1/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The SPARC ABI is a bit special with respect to the floating point context. The complete floating point context is volatile. Thus, from an ABI point of view nothing needs to be saved and restored during a context switch. Instead the floating point context must be saved and restored during interrupt processing. Historically, the deferred floating point switch was used for SPARC and the complete floating point context is saved and restored during a context switch to the new floating point unit owner. This is a bit dangerous since post-switch actions (e.g. signal handlers) and context switch extensions may silently corrupt the floating point context. The floating point unit is disabled for interrupt handlers. Thus, in case an interrupt handler uses the floating point unit then this will result in a trap (INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT). In uniprocessor configurations, a lazy floating point context switch is used. In case an active floating point thread is interrupted (PSR[EF] == 1) and a thread dispatch is carried out, then this thread is registered as the floating point owner. When a floating point owner is present during a context switch, the floating point unit is disabled for the heir thread (PSR[EF] == 0). The floating point disabled trap checks that the use of the floating point unit is allowed and saves/restores the floating point context on demand. Update #3077.
* sparc: Adjust assembly to improve compability with LLVMJacob Hansen2017-05-141-1/+1
| | | | | | | | | | | | | - All references of %0 changed to %g0 - 'call label,0' changed to 'call label'. According to the sparc specification call does not take any registers - '.seg "text"' changed to '.section ".text"' - the synonym stub is replaced with stb - the synonym stuh is replaced with sth
* sparc: Optimize _ISR_Handler()Sebastian Huber2016-11-281-0/+37
| | | | | | Use _Thread_Do_dispatch() instead of _Thread_Dispatch(). Restore the PSR[EF] state of the interrupted context via new system call syscall_irqdis_fp in case floating-point support is enabled.
* SPARC: optimize IRQ enable & disableDaniel Hellstrom2014-12-041-53/+65
| | | | | | | | | | | | | | | | * Coding style cleanups. * Use OS reserved trap 0x89 for IRQ Disable * Use OS reserved trap 0x8A for IRQ Enable * Add to SPARC CPU supplement documentation This will result in faster Disable/Enable code since the system trap handler does not need to decode which function the user wants. Besides the IRQ disable/enabled can now be inline which avoids the caller to take into account that o0-o7+g1-g4 registers are destroyed by trap handler. It was also possible to reduce the interrupt trap handler by five instructions due to this.
* score/sparc: Add support for paravirtualizationChristian Mauderer2014-06-031-0/+36
| | | | | | | Guest systems in paravirtualization environments run usually in user mode. Thus it is not possible to directly access the PSR and TBR registers. Use functions instead of inline assembler to access these registers if RTEMS_PARAVIRT is defined.
* SPARC: syscall optimizations and PSR-write fixDaniel Hellstrom2014-05-281-14/+14
| | | | | | | | | | | | | | | The last optimization missed was incorrect in regards to PSR write instruction delay must be 3 instructions. New optimizations: * align to 32-byte cache line. * rearrange code into three "blocks" of 4 instructions that is executed by syscall 2 and 3. This is to optimize for 16/32 byte cache lines. * use delay-slot instruction in trap table to reduce by one instruction. * use the fact that "wr %PSR" implements XOR to reduce by one instruction.
* SPARC: add syscall 1 (exit) function entry pointDaniel Hellstrom2014-05-231-0/+13
| | | | | | The exit SPARC system call doesn't have a function entry point like the others do. This is probably why people use TA 0x0 instruction directly for shutting down the system.
* SPARC: syscall code clean-up and minor optimizationsDaniel Hellstrom2014-05-231-16/+11
|
* Whitespace removal.Ralf Corsepius2009-11-301-4/+4
|
* 2004-04-01 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius2004-04-011-1/+1
| | | | | * reg_win/window.S: Include <rtems/asm.h> instead of <asm.h>. * syscall/syscall.S: Include <rtems/asm.h> instead of <asm.h>.
* New files from Jiri Gaisler <jgais@ws.estec.esa.nl>.Joel Sherrill1999-07-091-0/+78