From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Bowman To: gas2@cygnus.com Cc: bowman@waterloo.hp.com Subject: sign error in tc-mips.c for gas Date: Thu, 18 Apr 1996 21:20:00 -0000 Message-id: <199604190420.AA083807629@hppadap.waterloo.hp.com> X-SW-Source: 1996/msg00016.html This occurs in the assembler when doing any kernel work (ie addresses have the high-bit set). This test file shows the error: .text .align 2 .globl usrBootLineInit .ent usrBootLineInit usrBootLineInit: lw $2,0x80000000 # << error shows here .end usrBootLineInit The error is occuring for me on an HP-UX host with a target of mips-any-elf. In particular, if ((offset_expr.X_add_number) >= MAX_GPREL_OFFSET in the function macro(), line 3579. I am enclosing a diff in this email since it is only one line. diff -C3 config/tc-mips.c@@/main/1 config/tc-mips.c *** config/tc-mips.c@@/main/1 Fri Apr 5 12:43:08 1996 --- config/tc-mips.c Fri Apr 19 00:12:53 1996 *************** *** 3572,3578 **** With a constant we always use the latter case. */ if (breg == 0) { ! if (offset_expr.X_add_number >= MAX_GPREL_OFFSET || nopic_need_relax (offset_expr.X_add_symbol)) p = NULL; else --- 3572,3578 ---- With a constant we always use the latter case. */ if (breg == 0) { ! if ((unsigned long )(offset_expr.X_add_number) >= MAX_GPREL_OFFSET || nopic_need_relax (offset_expr.X_add_symbol)) p = NULL; else -- Don Bowman ** bowman@waterloo.hp.com ** 519-883-3019