Hi Florian,
i add in Tx86Instructiones.AddReferenzeSizes a memory-size-checking for assembler sse- and avx-opcodes with warnings if memory-reference is to small.
e.g.
type
TXMMDWord = record
int0: dword;
int1: dword;
int2: dword;
//int3: dword;
end;
TXMMDWord1 = record
int0: dword;
int1: dword;
int2: dword;
int3: dword;
end;
var
a: byte;
b: TXMMDWord;
c: TXMMDWord1;
begin
asm
movdqa xmm0, a
movdqa xmm0, b
movdqa xmm0, c + $20
end;
end;
a = opsize = S_B
b = opsize = S_NO
c = opsize = S_NO
a)
// in this time: fpc = ok
// new: fpc warning "... size is 8 bits, expected 128 bits"
b)
// in this time: fpc = ok
// new: fpc warning "... size is 96 bits, expected 128 bits"
c)
// in this time: fpc = ok
// new: fpc warning "... size is 128 bits, expected 128 bits + offset 32 byte"
Torsten
Show quoted text 30 lines
-----Ursprüngliche Nachricht-----
Von: Florian Klämpfl
Gesendet: Mo. 02.04.2012 09:07
An: FPC developers list
Betreff: Re: [fpc-devel] fpc - assembler reader: sizeof record or array
Am 02.04.2012 06:50, schrieb Torsten:
> Hi,
>
> i need the size of a global variable
(type record).
>
> local var:
"operands[i].opr.localsym.getsize"
> global var: ???
>
> I can add a new field "globalsym" in
the "TReference"-record ?
>
> What you say?
Why do you need the size? At this point everything should be
translated
into S_* constants?
_______________________________________________
fpc-devel maillist -
target="_blank">
http://lists.freepascal.org/mailman/listinfo/fpc-devel
-----Ursprüngliche Nachricht Ende-----
---
Nutzen Sie freenet Mail optimal angepasst für Ihr iPhone, Android oder Nokia Handy auch von unterwegs. Alle Infos und Download unter http://mail.freenet.de/mobile-email/index.html
---
Nutzen Sie freenet Mail optimal angepasst für Ihr iPhone, Android oder Nokia Handy auch von unterwegs. Alle Infos und Download unter freenetMail Apps