glenne%hplsla@HPLABS.HP.COM (Glenn Engel) (10/13/88)
The following patch to 1.25.1 crt0.c is needed for hp-ux.
It adds initialization of several more flag variables.
Glenn
*** crt0.c Wed Oct 12 16:58:23 1988
--- ../g++-1.25.1/crt0.c Wed Oct 12 17:10:31 1988
***************
*** 502,507
asm(" global __start");
asm(" global _exit");
asm(" global _main");
asm("__start:");
asm(" byte 0,0,0,0");
asm(" subq.w &1,%d0");
--- 502,508 -----
asm(" global __start");
asm(" global _exit");
asm(" global _main");
+ asm(" global flag_fpa,flag_68010,fpa_loc,float_loc");
asm("__start:");
asm(" byte 0,0,0,0");
asm(" sub.l %a6,%a6");
***************
*** 504,509
asm(" global _main");
asm("__start:");
asm(" byte 0,0,0,0");
asm(" subq.w &1,%d0");
asm(" mov.w %d0,float_soft");
asm(" mov.w %d1,flag_68881");
--- 505,511 -----
asm(" global flag_fpa,flag_68010,fpa_loc,float_loc");
asm("__start:");
asm(" byte 0,0,0,0");
+ asm(" sub.l %a6,%a6");
asm(" subq.w &1,%d0");
asm(" mov.w %d0,float_soft");
asm(" mov.w %d1,flag_68881");
***************
*** 508,514
asm(" mov.w %d0,float_soft");
asm(" mov.w %d1,flag_68881");
asm(" beq.b skip_float");
! asm(" fmov.l &0x7480,%fpcr");
asm("skip_float:");
asm(" mov.l 4(%a7),%d0");
asm(" beq.b skip_1");
--- 510,516 -----
asm(" mov.w %d0,float_soft");
asm(" mov.w %d1,flag_68881");
asm(" beq.b skip_float");
! asm(" fmov.l &0x7400,%fpcr");
asm("skip_float:");
asm(" move.l %a0,%d0");
asm(" add.l %d0,%d0");
***************
*** 510,515
asm(" beq.b skip_float");
asm(" fmov.l &0x7480,%fpcr");
asm("skip_float:");
asm(" mov.l 4(%a7),%d0");
asm(" beq.b skip_1");
asm(" mov.l %d0,%a0");
--- 512,524 -----
asm(" beq.b skip_float");
asm(" fmov.l &0x7400,%fpcr");
asm("skip_float:");
+ asm(" move.l %a0,%d0");
+ asm(" add.l %d0,%d0");
+ asm(" subx.w %d1,%d1");
+ asm(" move.w %d1,flag_68010");
+ asm(" add.l %d0,%d0");
+ asm(" subx.w %d1,%d1");
+ asm(" move.w %d1,flag_fpa");
asm(" mov.l 4(%a7),%d0");
asm(" beq.b skip_1");
asm(" mov.l %d0,%a0");
***************
*** 541,547
asm(" trap &0");
asm(" comm float_soft, 4");
asm(" comm flag_68881, 4");
!
#endif /* new hp assembler */
#endif /* hp9000 */
--- 550,560 -----
asm(" trap &0");
asm(" comm float_soft, 4");
asm(" comm flag_68881, 4");
! asm(" comm flag_68010, 4");
! asm(" comm flag_fpa, 4");
! asm(" set float_loc,0xffffb000");
! asm(" set fpa_loc,0xfff08000");
!
#endif /* new hp assembler */
#endif /* hp9000 */