Browse Source

* use variables of correct size with movd (test checks whether movd only
reads 32 bit even when destination is xmm register) (mantis #35701,
as noted by J. Gareth Moreton)

git-svn-id: trunk@42268 -

Jonas Maebe 6 years ago
parent
commit
fb387da807
1 changed files with 7 additions and 4 deletions
  1. 7 4
      tests/webtbs/tw13294.pp

+ 7 - 4
tests/webtbs/tw13294.pp

@@ -6,14 +6,17 @@ program movdtest;
 var 
 var 
   a: int64 = 128133443 or (int64(123455) shl 32);
   a: int64 = 128133443 or (int64(123455) shl 32);
   b: int64;
   b: int64;
+  al: longint absolute a;
+  bl: longint absolute b;
 begin
 begin
+  b:=0;
   asm
   asm
 {$ifdef cpui386}
 {$ifdef cpui386}
-      movd a, %xmm0
-      movd %xmm0, b
+      movd al, %xmm0
+      movd %xmm0, bl
 {$else}
 {$else}
-      movd a(%rip), %xmm0
-      movd %xmm0, b(%rip)
+      movd al(%rip), %xmm0
+      movd %xmm0, bl(%rip)
 {$endif}
 {$endif}
   end;
   end;
   if b<>128133443 then
   if b<>128133443 then