D
Deleted member 67440
Guest
I am trying to embed in a .cpp file (gnu gcc) a rather large assembly file (300KB), containing all kinds of instructions (SSE, AVX etc).
Something like
Well putting (at the end of the cpp)
and compiling with -masm=intel
does not work (lot of strange errors)
Some advises?
Thank you
Something like
Code:
g++ zpaqfranz.cpp blake3_gnu.S -o zpaqfranz
Well putting (at the end of the cpp)
Code:
asm volatile (".intel_syntax noprefix\n\t"
".global blake3_hash_many_sse2\n\t"
".global _blake3_hash_many_sse2\n\t"
".global blake3_compress_in_place_sse2\n\t"
".global _blake3_compress_in_place_sse2\n\t"
".global blake3_compress_xof_sse2\n\t"
".global _blake3_compress_xof_sse2\n\t"
".section .text\n\t"
" .p2align 6\n\t"
"_blake3_hash_many_sse2:\n\t"
"blake3_hash_many_sse2:\n\t"
" push r15\n\t"
" push r14\n\t"
" push r13\n\t"
" push r12\n\t"
" push rsi\n\t"
" push rdi\n\t"
" push rbx\n\t"
" push rbp\n\t"
(...)
and compiling with -masm=intel
Code:
g++ -masm=intel -O3 zpaqfranz.cpp -o zpaqfranz
Code:
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:92979: Error: operand type mismatch for `crc32'
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:93003: Error: junk `(rsi)' after expression
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:93004: Error: junk `(rsi)' after expression
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:93057: Error: junk `(rsi)' after expression
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:93058: Error: junk `(rsi)' after expression
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:93126: Error: operand type mismatch for `crc32'
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:93134: Error: operand type mismatch for `crc32'
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:93143: Error: operand type mismatch for `crc32'
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:93152: Error: operand type mismatch for `crc32'
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:93161: Error: operand type mismatch for `crc32'
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:93170: Error: operand type mismatch for `crc32'
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:93179: Error: operand type mismatch for `crc32'
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:102102: Error: invalid use of register
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:222049: Error: invalid use of register
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:222296: Error: invalid use of register
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:223188: Error: invalid use of register
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:223277: Error: invalid use of register
C:\Users\utente\AppData\Local\Temp\ccsPhVZ3.s:223848: Error: invalid use of register
Some advises?
Thank you