I've no idea whether one's allowed to mutate a parameter passed on the
stack. Play it safe.
This means that (a) the counter is now in a fixed place in the frame so
that `testtail' doesn't need to be told where it is, an (b)
`testprologue' needs to initialize it from the caller's parameter, so it
needs to grow a macro argument.
mov [ebx + ecx*8 + 4], edx
.endm
mov [ebx + ecx*8 + 4], edx
.endm
pushreg ebp
pushreg ebx
pushreg esi
pushreg ebp
pushreg ebx
pushreg esi
and esp, ~15
sub esp, 3*32 + 4*4
endprologue
and esp, ~15
sub esp, 3*32 + 4*4
endprologue
+ mov eax, \n
+ mov [esp + 104], eax
// vars:
// esp + 0 = v expanded
// esp + 32 = y expanded
// esp + 64 = ? expanded
// esp + 96 = cycles
// vars:
// esp + 0 = v expanded
// esp + 32 = y expanded
// esp + 64 = ? expanded
// esp + 96 = cycles
.endm
.macro testepilogue
.endm
.macro testepilogue
-.macro testtail cyv, n
- cystore esp + 96, \cyv, \n
+.macro testtail cyv
+ cystore esp + 96, \cyv, esp + 104
+ testprologue [ebp + 44]
testldcarry [ebp + 24]
testexpand [ebp + 36], [ebp + 40]
mov edi, [ebp + 20]
testtop [ebp + 28], [ebp + 32]
call dmul4
testldcarry [ebp + 24]
testexpand [ebp + 36], [ebp + 40]
mov edi, [ebp + 20]
testtop [ebp + 28], [ebp + 32]
call dmul4
- testtail [ebp + 48], [ebp + 44]
testcarryout [ebp + 24]
testepilogue
ENDFUNC
FUNC(test_dmla4)
testcarryout [ebp + 24]
testepilogue
ENDFUNC
FUNC(test_dmla4)
+ testprologue [ebp + 44]
testldcarry [ebp + 24]
testexpand [ebp + 36], [ebp + 40]
mov edi, [ebp + 20]
testtop [ebp + 28], [ebp + 32]
call dmla4
testldcarry [ebp + 24]
testexpand [ebp + 36], [ebp + 40]
mov edi, [ebp + 20]
testtop [ebp + 28], [ebp + 32]
call dmla4
- testtail [ebp + 48], [ebp + 44]
testcarryout [ebp + 24]
testepilogue
ENDFUNC
FUNC(test_mul4)
testcarryout [ebp + 24]
testepilogue
ENDFUNC
FUNC(test_mul4)
+ testprologue [ebp + 36]
testldcarry [ebp + 24]
testexpand nil, [ebp + 32]
mov edi, [ebp + 20]
testtop nil, [ebp + 28]
call mul4
testldcarry [ebp + 24]
testexpand nil, [ebp + 32]
mov edi, [ebp + 20]
testtop nil, [ebp + 28]
call mul4
- testtail [ebp + 40], [ebp + 36]
testcarryout [ebp + 24]
testepilogue
ENDFUNC
FUNC(test_mla4)
testcarryout [ebp + 24]
testepilogue
ENDFUNC
FUNC(test_mla4)
+ testprologue [ebp + 36]
testldcarry [ebp + 24]
testexpand nil, [ebp + 32]
mov edi, [ebp + 20]
testtop nil, [ebp + 28]
call mla4
testldcarry [ebp + 24]
testexpand nil, [ebp + 32]
mov edi, [ebp + 20]
testtop nil, [ebp + 28]
call mla4
- testtail [ebp + 40], [ebp + 36]
testcarryout [ebp + 24]
testepilogue
ENDFUNC
FUNC(test_mmul4)
testcarryout [ebp + 24]
testepilogue
ENDFUNC
FUNC(test_mmul4)
+ testprologue [ebp + 48]
testexpand [ebp + 40], [ebp + 44]
mov edi, [ebp + 20]
testtop [ebp + 32], [ebp + 36], mont
call mmul4
testexpand [ebp + 40], [ebp + 44]
mov edi, [ebp + 20]
testtop [ebp + 32], [ebp + 36], mont
call mmul4
- testtail [ebp + 52], [ebp + 48]
mov edi, [ebp + 28]
movdqa xmm0, [esp + 64]
movdqa xmm1, [esp + 80]
mov edi, [ebp + 28]
movdqa xmm0, [esp + 64]
movdqa xmm1, [esp + 80]
+ testprologue [ebp + 48]
testexpand [ebp + 40], [ebp + 44]
mov edi, [ebp + 20]
testtop [ebp + 32], [ebp + 36], mont
call mmla4
testexpand [ebp + 40], [ebp + 44]
mov edi, [ebp + 20]
testtop [ebp + 32], [ebp + 36], mont
call mmla4
- testtail [ebp + 52], [ebp + 48]
mov edi, [ebp + 28]
movdqa xmm0, [esp + 64]
movdqa xmm1, [esp + 80]
mov edi, [ebp + 28]
movdqa xmm0, [esp + 64]
movdqa xmm1, [esp + 80]
+ testprologue [ebp + 40]
testexpand nil, [ebp + 36]
mov edi, [ebp + 20]
testtop nil, [ebp + 32], mont
call mont4
testexpand nil, [ebp + 36]
mov edi, [ebp + 20]
testtop nil, [ebp + 32], mont
call mont4
- testtail [ebp + 44], [ebp + 40]
mov edi, [ebp + 28]
movdqa xmm0, [esp + 64]
movdqa xmm1, [esp + 80]
mov edi, [ebp + 28]
movdqa xmm0, [esp + 64]
movdqa xmm1, [esp + 80]