Skip to content

Commit

Permalink
macos fixes for alignment check assembly wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
nlsandler committed Mar 26, 2024
1 parent 655c486 commit 4c616a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% extends "includes/wrapper_base.s.jinja" %}
{% block call %}
# call test functions, all of which exit early on failure
callq test1
callq test2
callq test3
callq {{id_prefix}}test1
callq {{id_prefix}}test2
callq {{id_prefix}}test3
{% endblock %}
{% block more_functions %}
.text
Expand All @@ -21,7 +21,7 @@
je {{local_prefix}}_OK
# it's not zero; exit
# using exit code already in EDI
call exit@PLT
call {{id_prefix}}exit{{plt_suffix}}
{{local_prefix}}_OK:
# success; rsp is aligned correctly
movl $0, %eax
Expand Down
8 changes: 4 additions & 4 deletions tests/chapter_20/libraries/alignment_check_wrapper_osx.s
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ _main:
movq $-4, %r14
movq $-5, %r15
# call test functions, all of which exit early on failure
callq test1
callq test2
callq test3
callq _test1
callq _test2
callq _test3
# make sure values of callee-saved regs were preserved
cmpq $-1, %rbx
jne Lfail
Expand Down Expand Up @@ -82,7 +82,7 @@ _check_alignment:
je L_OK
# it's not zero; exit
# using exit code already in EDI
call exit@PLT
call _exit
L_OK:
# success; rsp is aligned correctly
movl $0, %eax
Expand Down

0 comments on commit 4c616a9

Please sign in to comment.