I am slightly confused by some x86_64 linux code here (generated by llvm):
# BB#0: # %entry
push RBP
.Ltmp21:
.cfi_def_cfa_offset 16
.Ltmp22:
.cfi_offset rbp, -16
mov RBP, RSP
.Ltmp23:
.cfi_def_cfa_register rbp
push RBX
push RAX
.Ltmp24:
.cfi_offset rbx, -24
mov EDI, .L.urandom
mov ESI, 8
call open
mov EBX, EAX
mov EDI, EBX
mov ESI, ptrenc.keys
mov EDX, 16
call read
From what I read in wikipedia, I would have expected the arguments to open and read to be passed in R-Registers (RDI, RSI, RDX).
The code uses the 64-bit Registers to build the stack frame. Why does it use the 32-bit registers for the calls?