[S390] Inline assembly cleanup.
Major cleanup of all s390 inline assemblies. They now have a common coding style. Quite a few have been shortened, mainly by using register asm variables. Use of the EX_TABLE macro helps as well. The atomic ops, bit ops and locking inlines new use the Q-constraint if a newer gcc is used. That results in slightly better code. Thanks to Christian Borntraeger for proof reading the changes. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
@@ -120,24 +120,15 @@ static enum shutdown_action on_panic_action = SHUTDOWN_STOP;
|
||||
|
||||
static int diag308(unsigned long subcode, void *addr)
|
||||
{
|
||||
register unsigned long _addr asm("0") = (unsigned long)addr;
|
||||
register unsigned long _addr asm("0") = (unsigned long) addr;
|
||||
register unsigned long _rc asm("1") = 0;
|
||||
|
||||
asm volatile (
|
||||
" diag %0,%2,0x308\n"
|
||||
"0: \n"
|
||||
".section __ex_table,\"a\"\n"
|
||||
#ifdef CONFIG_64BIT
|
||||
" .align 8\n"
|
||||
" .quad 0b, 0b\n"
|
||||
#else
|
||||
" .align 4\n"
|
||||
" .long 0b, 0b\n"
|
||||
#endif
|
||||
".previous\n"
|
||||
asm volatile(
|
||||
" diag %0,%2,0x308\n"
|
||||
"0:\n"
|
||||
EX_TABLE(0b,0b)
|
||||
: "+d" (_addr), "+d" (_rc)
|
||||
: "d" (subcode) : "cc", "memory" );
|
||||
|
||||
: "d" (subcode) : "cc", "memory");
|
||||
return _rc;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user