Fix tests for printf %p: Don't use random magic number but actual pointers, since that's what %p is for)
This commit is contained in:
@@ -101,7 +101,7 @@ section .rodata
|
|||||||
printf13Str db "%o | %8o | %08o\n",EOS
|
printf13Str db "%o | %8o | %08o\n",EOS
|
||||||
printf14 db TAB,"printf(",DQUO,"%#b | %#08b | %#x | %#8X | %#o\n",DQUO,", 8, 8, 0xABCDEF, 0x12345678, 15): ",NL,TAB,TAB,EOS
|
printf14 db TAB,"printf(",DQUO,"%#b | %#08b | %#x | %#8X | %#o\n",DQUO,", 8, 8, 0xABCDEF, 0x12345678, 15): ",NL,TAB,TAB,EOS
|
||||||
printf14Str db "%#b | %#08b | %#x | %#8X | %#o\n",EOS
|
printf14Str db "%#b | %#08b | %#x | %#8X | %#o\n",EOS
|
||||||
printf15 db TAB,"printf(",DQUO,"%p | %#p | %8p | %08p | %#08p\n",DQUO,", 0xabc, 0xabc, 0xabc, 0xabc, 0xabc): ",NL,TAB,TAB,EOS
|
printf15 db TAB,"printf(",DQUO,"%p | %#p | %8p | %08p | %#08p\n",DQUO,", str5, str5, str5, strBuff1, strBuff1): ",NL,TAB,TAB,EOS
|
||||||
printf15Str db "%p | %#p | %8p | %08p | %#08p\n",EOS
|
printf15Str db "%p | %#p | %8p | %08p | %#08p\n",EOS
|
||||||
; strlen()
|
; strlen()
|
||||||
msgStrlen db NL,"TEST strlen()",NL,EOS
|
msgStrlen db NL,"TEST strlen()",NL,EOS
|
||||||
@@ -402,11 +402,11 @@ _start:
|
|||||||
lea rdi, [rel printf15]
|
lea rdi, [rel printf15]
|
||||||
call print
|
call print
|
||||||
lea rdi, [rel printf15Str]
|
lea rdi, [rel printf15Str]
|
||||||
mov rsi, 0xabc
|
lea rsi, [rel str5]
|
||||||
mov rdx, 0xabc
|
lea rdx, [rel str5]
|
||||||
mov rcx, 0xabc
|
lea rcx, [rel str5]
|
||||||
mov r8, 0xabc
|
lea r8, [rel strBuff1]
|
||||||
mov r9, 0xabc
|
lea r9, [rel strBuff1]
|
||||||
call printf
|
call printf
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user