X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-sparc%2Fwinmacro.h;h=096f3d3d90c3f7996f78c03f4570fb7cec013f6e;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=cb80840b111ef43f74bb9dfe02b797fbafcaea8c;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/asm-sparc/winmacro.h b/include/asm-sparc/winmacro.h index cb80840b1..096f3d3d9 100644 --- a/include/asm-sparc/winmacro.h +++ b/include/asm-sparc/winmacro.h @@ -7,7 +7,6 @@ #ifndef _SPARC_WINMACRO_H #define _SPARC_WINMACRO_H -#include #include /* Store the register window onto the 8-byte aligned area starting @@ -112,9 +111,12 @@ and %idreg, 0xc, %idreg; \ ld [%idreg + %dest_reg], %dest_reg; -/* Sliiick. We have a Linux current register :) -jj */ -#define LOAD_CURRENT4D(dest_reg) \ - lda [%g0] ASI_M_VIKING_TMP2, %dest_reg; +#define LOAD_CURRENT4D(dest_reg, idreg) \ + lda [%g0] ASI_M_VIKING_TMP1, %idreg; \ + sethi %hi(C_LABEL(current_set)), %dest_reg; \ + sll %idreg, 2, %idreg; \ + or %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \ + ld [%idreg + %dest_reg], %dest_reg; /* Blackbox - take care with this... - check smp4m and smp4d before changing this. */ #define LOAD_CURRENT(dest_reg, idreg) \