Alright, I will admit, I'm new to NASM and compiling someone else's code that is not compiling so I'm here debugging it.
This looks like a common problem as I wander the forums, many errors on a compile that show:
routines64.asm:955: error: invalid combination of opcode and operands
These all point to pinsrb instructions in the code. There are two things this could be, as far as I can see:
- my toolset is out of date, I'm stuck on NASM 2.0 due to CentOS not liking GLIBC_2_7 (even 5.6 seems to have 2_5)
- I'm hoping it's not the above and this is simply a portability issue
The blocks of code the compiler is not digesting relates to an attempt to write values into a vector register (I guess):
;------------------------------------------------------------------------------
; Name: Register8ToVector
; Purpose: Writes 8-bit main register values into 128-bit vector register
; without clearing the unused bits.
; Params: rdi = loops
;------------------------------------------------------------------------------
Register8ToVector:
_Register8ToVector:
sal rdi, 2 ; Force some repetition.
.L1:
pinsrb xmm1, al, 0
pinsrb xmm2, bl, 1
pinsrb xmm3, cl, 2
pinsrb xmm1, dl, 3
pinsrb xmm2, sil, 4
pinsrb xmm3, dil, 5
pinsrb xmm0, bpl, 6
pinsrb xmm0, spl, 7
.....
Similar (but not equal) pins instructions work fine so I'm wondering if this is some sort of size issue ('pinsrq xmm1, r8, 0' compiles cleanly).
Ugh, I feel like a newbie ...
Paul Monday