X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=avr-asm-macros.S;h=0fd325dfc168c6380fe941be23bb90b2971c1ecc;hb=a0ce7501a539a69774754515268ab02297dabba7;hp=4991ceea0ec1a5fa39353305dafb9b52d8abcc41;hpb=a397db40b94b01a3ed72f9367961cf68d82593d1;p=avr-crypto-lib.git diff --git a/avr-asm-macros.S b/avr-asm-macros.S index 4991cee..0fd325d 100644 --- a/avr-asm-macros.S +++ b/avr-asm-macros.S @@ -1,6 +1,6 @@ /* avr-asm-macros.S */ /* - This file is part of the Crypto-avr-lib/microcrypt-lib. + This file is part of the AVR-Crypto-Lib. Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de) This program is free software: you can redistribute it and/or modify @@ -107,6 +107,18 @@ out _SFR_IO_ADDR(SPL), \reg1 .endm +.macro stack_free_large2 size:req, reg1=r30, reg2=r31 + in r0, _SFR_IO_ADDR(SREG) + in \reg1, _SFR_IO_ADDR(SPL) + in \reg2, _SFR_IO_ADDR(SPH) + adiw \reg1, 63 + adiw \reg1, 63 + adiw \reg1, (\size-63*2) + cli + out _SFR_IO_ADDR(SPH), \reg2 + out _SFR_IO_ADDR(SREG), r0 + out _SFR_IO_ADDR(SPL), \reg1 +.endm /*******************************************************************************