Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2021-04

Inline assembler m32 source operand

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

LacaK

Hi,

how can I address m32 source operand in inline assembler instruction like :

asm
  ...
  VBROADCASTSS m32, %xmm1;
  ...
end;

if I would like broadcast to %xmm10 single 32bit value at given memory location in:

const SI:single=0.1;
or
var SI:single=0.1;

Now I do it by (it works):
asm
  ...
  mov $SI, %rax;
  vbroadcastss (%rax), %xmm10;
  ...
end;

000000010020C4CF 48b8b043270001000000     movabs $0x1002743b0,%rax 000000010020C4D9 c462791810               vbroadcastss (%rax),%xmm10

Is there shorter - one liner - way? Something like:   vbroadcastss SI, %xmm10; // compiles, but causes A/V when executed, because only low 32bit of address is taken (x86_64):

000000010020C4D9 c46279181425b0432700     vbroadcastss 0x2743b0,%xmm10

Thanks

-Laco.

Reply by email