HCT 12.1 ABIPROV x64 Calling Convention Test

T

Terry

ABIPROV.EXE is reporting that in [test_func] the stack is misaligned with
relative depth FFFFFFD8 at instruction : @ call test_leaf"". .
I count 8-bytes for the pushed RIP, 8 bytes for the pushed R15, so the stack
should be 16-bit aligned.
But, it also reports the same thing for [test_func2], but with a depth of
FFFFFFD0. It would seem there is something wrong with ABIPROV.EXE. There
was a thread about this in microsoft.public.development.device.drivers.

Also, ABIPROV.EXE reports that R15 is not being saved/restored correctly, in
both functions. In what way is this incorrect?

These functions are simplifications of the real functions that are failing
the test.

But, I only just found out today about this NESTED_ENTRY, .pushreg stuff in
MACAMD64.INC, so I could be missing something!!

Except that HCT 12.1 says that the x64 Calling Convention Test is
"(preview)". Should I tell my boss that I don't fully understand what I am
doing??? Or that the HCT test is flawed??? The first is unbelievable to
me, the second unbelievable to my boss!!!

Thanks In Advance...


NESTED_ENTRY test_func, COMPRESS
mov [rsp+8], rcx
push r15
.pushreg r15
sub rsp, 32
.allocstack 32
.endprolog

mov rcx, 33
call test_leaf

add rsp, 32
pop r15
ret
NESTED_END test_func, COMPRESS

NESTED_ENTRY test_func2, COMPRESS
mov [rsp+8], rcx
push r15
.pushreg r15
sub rsp, 40
.allocstack 40
.endprolog

mov rcx, 33
call test_leaf

add rsp, 40
pop r15
ret
NESTED_END test_func2, COMPRESS


LEAF_ENTRY test_leaf, COMPRESS
mov rax, 100
sub rax, rcx
ret
LEAF_END test_leaf, COMPRESS
 
T

Terry

I have another function declared as a LEAF_FUNCTION. ABIPROV.EXE reports
that RBX, RDI and RSI are not saved/restored correctly. The registers are
modified in the function, and they are not saved/restored, but the docs say
that leaf functions are not allowed to save any non-volatile registers.

ABIPROV.EXE: Microsoft (R) x64 Calling Convention Checker 2.41.3709 (Dec 9
2004 11:42:26)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top