From cdd7d9dee7e120a250c3fd0c3062908067a9fbee Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 20 Apr 2013 17:55:47 +0000 Subject: Define PIC_OFFSET_TABLE_REGNUM as INVALID_REGNUM when not compiling PIC. Also, when compiling PIC, do not force PIC_OFFSET_TABLE_REGNUM to be set in global_regs[], there is no reason to do this (on the other hand, forcing it to be set in fixed_regs[] and call_used_regs[] is still necessary and correct). --- gnu/usr.bin/gcc/gcc/config/m88k/m88k.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gnu/usr.bin') diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h index bcfa7d41281..343348cdf89 100644 --- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h +++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.h @@ -450,10 +450,8 @@ extern int target_flags; /* -m compiler switches */ } \ if (flag_pic) \ { \ - /* Current hack to deal with -fpic -O2 problems. */ \ fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ - global_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ } \ } @@ -524,7 +522,7 @@ extern int target_flags; /* -m compiler switches */ /* Register to hold the addressing base for position independent code access to data items. */ -#define PIC_OFFSET_TABLE_REGNUM 25 +#define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 25 : INVALID_REGNUM) /* Order in which registers are preferred (most to least). Use temp registers, then param registers top down. Preserve registers are -- cgit v1.2.3