This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libobjc/13534] New: Invalid offset generated for loading 64-bit GPR on PPC64


With this compiler:

[dhcp10:~/programs/gambc40b4] lucier% gcc -v
Reading specs from /pkgs/gcc-3.4/lib/gcc/powerpc-apple-darwin7.2.0/3.4.0/specs
Configured with: ../configure --prefix=/pkgs/gcc-3.4 --disable-checking
Thread model: posix
gcc version 3.4.0 20031229 (experimental)

the following code gives the following result:

[dhcp10:~/programs/gambc40b4] lucier% gcc -v
Reading specs from /pkgs/gcc-3.4/lib/gcc/powerpc-apple-darwin7.2.0/3.4.0/specs
Configured with: ../configure --prefix=/pkgs/gcc-3.4 --disable-checking
Thread model: posix
gcc version 3.4.0 20031229 (experimental)

Brad

struct sigcontext {
    int sc_onstack;
    int sc_mask;
 int sc_ir;
    int sc_psw;
    int sc_sp;
 void *sc_regs;
};

typedef int jmp_buf[(26 + 36 + 129 + 1)];

static int ___lp;

/*

struct _jmp_buf {
 struct sigcontext sigcontext;
 unsigned long vmask __attribute__((aligned(8)));
 unsigned long vreg[32 * 4] __attribute__((aligned(16)));

};
*/

typedef struct ___jmpbuf_struct
  {
    jmp_buf buf;
  } ___jmpbuf_struct;


typedef struct ___processor_state_struct
  {
    int *stack_trip;
    int *stack_limit;
    int *fp;
    int *stack_start;
    int *stack_break;

    int *heap_limit;
    int *hp;

    int current_thread;
    int run_queue;

    int r[5];
    int pc;
    int temp1;
    int temp2;
    int temp3;
    int temp4;

    int na;
    int intr_enabled;
    int intr_flag[8];

    int glo_list_head;
    int glo_list_tail;

    int handler_break;
    int handler_stack_limit;
    int handler_heap_limit;
    int handler_not_proc;
    int handler_not_proc_glo;
    int handler_wrong_nargs;
    int handler_get_rest;
    int handler_get_key;
    int handler_get_key_rest;
    int handler_force;
    int handler_cfun_conv_error;
    int handler_sfun_conv_error;
    int handler_return_to_c;

    int executable_wills;
    int nonexecutable_wills;

    void (*dummy8) (void);
    void (*dummy7) (void);
    void (*dummy6) (void);
    void (*dummy5) (void);
    void (*dummy4) (void);
    void (*dummy3) (void);
    void (*dummy2) (void);
    void (*dummy1) (void);


    ___jmpbuf_struct *catcher;
  } ___processor_state_struct, *___processor_state;

typedef int (*___host) (___processor_state);

typedef struct ___label_struct
  {
    int header;
    int entry_or_descr;
    void* host_label;
    ___host host;
  } ___label_struct;

    int (*___isfinite)
       (double x);

static int ___H__23__23_rational_3f_ (___processor_state ___ps){ register int
___pc, ___start, ___temp; register unsigned long long ___temp64; register int
___r0; register int ___r1; double ___F64V1;
static void *___hlbl_tbl[]={
0,
&&___L0__23__23_rational_3f_,
0}; if (___ps == 0) return (int)___hlbl_tbl;
___r0=___ps->r[0]; ___r1=___ps->r[1]; ___start=___lp+((132)*4*4);
___pc=___ps->pc; goto *((___label_struct*)(___pc-1))->host_label;
___L0__23__23_rational_3f_:
   if(___ps->na==1){}else
   {___ps->temp1=___start+((132 -132 +0)*4*4); {
{___pc=___ps->handler_wrong_nargs;goto ___jumpext;}}}
___L__23__23_rational_3f_:
   if (((___r1&((1<<2)-1))==(0))) {
   goto ___L2__23__23_rational_3f_;
   }
   if
((((___temp=(___r1))&((1<<2)-1))==1&&((((*((int*)((___temp)-(1)))))&(((1<<5)-1)<<3))==(((30))<<3))))
{
   goto ___L3__23__23_rational_3f_;
   }
   if (!((___r1&((1<<2)-1))==(1))) {
   goto ___L1__23__23_rational_3f_;
   }
   ___r1=((((*((int*)((___r1)-(1))))&(((1<<5)-1)<<3))>>(3 -2)));
   if ((___r1==(((int)(31L))<<2))) {
   goto ___L2__23__23_rational_3f_;
   }
   if ((___r1==(((int)(2L))<<2))) {
   goto ___L2__23__23_rational_3f_;
   }
   if (!(___r1==(((int)(3L))<<2))) {
   goto ___L1__23__23_rational_3f_;
   }
___L1__23__23_rational_3f_:
   ___r1=(((((int)(-1))<<2)+2));
   { {void *___host_label; ___pc=___r0;
___host_label=((___label_struct*)(___pc-1))->host_label; if
(((___label_struct*)(___pc-1))->host == ___H__23__23_rational_3f_) goto
*___host_label; goto ___jumpext;}}
___L2__23__23_rational_3f_:
   ___r1=(((((int)(-2))<<2)+2));
   { {void *___host_label; ___pc=___r0;
___host_label=((___label_struct*)(___pc-1))->host_label; if
(((___label_struct*)(___pc-1))->host == ___H__23__23_rational_3f_) goto
*___host_label; goto ___jumpext;}}
___L3__23__23_rational_3f_:
   ___F64V1=(*((double*)((((int*)((___r1)-(1)))+1))));
   ___r1=((___isfinite(___F64V1))?((((int)(-2))<<2)+2):((((int)(-1))<<2)+2));
   { {void *___host_label; ___pc=___r0;
___host_label=((___label_struct*)(___pc-1))->host_label; if
(((___label_struct*)(___pc-1))->host == ___H__23__23_rational_3f_) goto
*___host_label; goto ___jumpext;}}
___jumpext:
___ps->pc=___pc; ___ps->r[1]=___r1; return ___pc; }

-- 
           Summary: Invalid offset generated for loading 64-bit GPR on PPC64
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libobjc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lucier at math dot purdue dot edu
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin7.2.0
  GCC host triplet: powerpc-apple-darwin7.2.0
GCC target triplet: powerpc-apple-darwin7.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13534


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]