]> gcc.gnu.org Git - gcc.git/commitdiff
re PR target/48496 ('asm' operand requires impossible reload)
authorJakub Jelinek <jakub@redhat.com>
Thu, 19 Jan 2012 10:47:59 +0000 (11:47 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 19 Jan 2012 10:47:59 +0000 (11:47 +0100)
PR rtl-optimization/48496
* src/ia64/ffi.c (ffi_call): Fix up aliasing violations.

From-SVN: r183301

libffi/ChangeLog
libffi/src/ia64/ffi.c

index a13e39c1fd036656ffe59a955c5dd16839032ac7..75ce3bf230f3d6919450bbf670428a8e29bcda96 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-19  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/48496
+       * src/ia64/ffi.c (ffi_call): Fix up aliasing violations.
+
 2012-01-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * configure.ac (i?86-*-*): Set TARGET to X86_64.
index 84b144868ed54e79125148639a73177976c3e71d..79e29b45a894a401c33ed7640f89b716eb2b85d8 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   ffi.c - Copyright (c) 1998, 2007, 2008 Red Hat, Inc.
+   ffi.c - Copyright (c) 1998, 2007, 2008, 2012 Red Hat, Inc.
           Copyright (c) 2000 Hewlett Packard Company
    
    IA64 Foreign Function Interface 
@@ -324,13 +324,17 @@ ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
        case FFI_TYPE_FLOAT:
          if (gpcount < 8 && fpcount < 8)
            stf_spill (&stack->fp_regs[fpcount++], *(float *)avalue[i]);
-         stack->gp_regs[gpcount++] = *(UINT32 *)avalue[i];
+         {
+           UINT32 tmp;
+           memcpy (&tmp, avalue[i], sizeof (UINT32));
+           stack->gp_regs[gpcount++] = tmp;
+         }
          break;
 
        case FFI_TYPE_DOUBLE:
          if (gpcount < 8 && fpcount < 8)
            stf_spill (&stack->fp_regs[fpcount++], *(double *)avalue[i]);
-         stack->gp_regs[gpcount++] = *(UINT64 *)avalue[i];
+         memcpy (&stack->gp_regs[gpcount++], avalue[i], sizeof (UINT64));
          break;
 
        case FFI_TYPE_LONGDOUBLE:
This page took 0.067056 seconds and 5 git commands to generate.