mirror of https://github.com/Nonannet/copapy.git
some fixes
This commit is contained in:
parent
315d5735cb
commit
66da1f6a9f
|
|
@ -55,16 +55,17 @@ jobs:
|
|||
- name: Generate debug asm files
|
||||
if: strategy.job-index == 0
|
||||
run: |
|
||||
objdump -d -x src/copapy/obj/stencils_x86_64_O3.o > bin/stencils_x86_64_O3.asm
|
||||
echo '<p>stencils_x86_64_O3.asm</p><pre>' >> $GITHUB_STEP_SUMMARY
|
||||
cat bin/stencils_x86_64_O3.asm >> $GITHUB_STEP_SUMMARY
|
||||
echo '</pre>' >> $GITHUB_STEP_SUMMARY
|
||||
python tools/make_example.py
|
||||
pip install ansi2html
|
||||
python tools/extract_code.py "bin/test.copapy" "bin/test.copapy.bin"
|
||||
objdump -D -b binary -m i386:x86-64 --adjust-vma=0x1000 bin/test.copapy.bin > bin/test.copapy.asm
|
||||
echo '<p>test.copapy.asm</p><pre>' >> $GITHUB_STEP_SUMMARY
|
||||
cat bin/test.copapy.asm >> $GITHUB_STEP_SUMMARY
|
||||
echo '</pre>' >> $GITHUB_STEP_SUMMARY
|
||||
objdump --color=always -D -b binary -m i386:x86-64 --adjust-vma=0x1000 bin/test.copapy.bin > bin/test.copapy.asm
|
||||
echo '<p>test.copapy.asm</p><code>' >> $GITHUB_STEP_SUMMARY
|
||||
cat bin/test.copapy.asm | ansi2html >> $GITHUB_STEP_SUMMARY
|
||||
echo '</code>' >> $GITHUB_STEP_SUMMARY
|
||||
objdump --color=always -d -j .text src/copapy/obj/stencils_x86_64_O3.o > bin/stencils_x86_64_O3.asm
|
||||
echo '<p>stencils_x86_64_O3.asm</p><code>' >> $GITHUB_STEP_SUMMARY
|
||||
cat bin/stencils_x86_64_O3.asm | ansi2html >> $GITHUB_STEP_SUMMARY
|
||||
echo '</code>' >> $GITHUB_STEP_SUMMARY
|
||||
python tools/make_example.py
|
||||
|
||||
- name: Run tests with pytest
|
||||
run: pytest
|
||||
|
|
|
|||
|
|
@ -7,10 +7,13 @@ op_signs = {'add': '+', 'sub': '-', 'mul': '*', 'div': '/',
|
|||
entry_func_prefix = ''
|
||||
stencil_func_prefix = '__attribute__((naked)) ' # Remove callee prolog
|
||||
|
||||
stack_size = 64
|
||||
|
||||
def get_aux_funcs() -> str:
|
||||
return f"""
|
||||
{entry_func_prefix}int entry_function_shell(){{
|
||||
volatile char stack_place_holder[64];
|
||||
volatile char stack_place_holder[{stack_size}];
|
||||
stack_place_holder[0] = 0;
|
||||
result_int(0);
|
||||
return 1;
|
||||
}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue