Re: [PATCH] restore_current o0 register clobber

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Krzysztof Helt <krzysztof.h1@xxxxx>
Date: Sun, 26 Aug 2007 19:08:58 +0200

> From: Krzysztof Helt <krzysztof.h1@xxxxx>
> 
> This patch changes call definitions of the restore_current(void)
> to restore_current(int) to force usage of the o0 register. The o0
> register is used internally and compiler must not assume
> it is preserved during the call.
> 
> Signed-off-by: Krzysztof Helt <krzysztof.h1@xxxxx>

This patch is a NOP ;-)

The compiler already must assume that all outgoing argument registers
are potentially clobbered by the function being called, as that
function may use those registers freely as temporaries.  This is true
even if there are no arguments being passed in.

Therefore %o0 --> %o5 are free to use by any function called from C.

Otherwise a lot of things would simply not work.
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux