https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67634

            Bug ID: 67634
           Summary: Can't preserve bound register in interrupt handler
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: julia.koval at intel dot com
            Blocks: 67552
  Target Milestone: ---

[hjl@gnu-6 interrupt-6]$ cat bnd.i 
void
__attribute__((interrupt))
fn1 (void)
{
  asm ("#"
       :
       : 
       : "bnd0");
}
[hjl@gnu-6 interrupt-6]$ make
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2 -mmpx -g -S -o bnd.s bnd.i
bnd.i: In function ‘fn1’:
bnd.i:9:1: error: insn does not satisfy its constraints:
 }
 ^
(insn/f 9 3 10 2 (set (mem:DI (pre_dec:DI (reg/f:DI 7 sp)) [0  S8 A8])
        (reg:DI 77 bnd0)) bnd.i:4 61 {*pushdi2_rex64}
     (expr_list:REG_DEAD (reg:DI 77 bnd0)
        (nil)))
bnd.i:9:1: internal compiler error: in extract_constrain_insn, at recog.c:2200
0xcf01e5 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /export/gnu/import/git/sources/gcc/gcc/rtl-error.c:109
0xcf0245 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /export/gnu/import/git/sources/gcc/gcc/rtl-error.c:120
0xca21a2 extract_constrain_insn(rtx_insn*)
        /export/gnu/import/git/sources/gcc/gcc/recog.c:2200
0xcb080f copyprop_hardreg_forward_1
        /export/gnu/import/git/sources/gcc/gcc/regcprop.c:778
0xcb2040 execute
        /export/gnu/import/git/sources/gcc/gcc/regcprop.c:1268
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Makefile:27: recipe for target 'bnd.s' failed
make: *** [bnd.s] Error 1
[hjl@gnu-6 interrupt-6]$ 

We can't use push to save bound registers.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67552
[Bug 67552] [meta] x86 interrupt attribute

Reply via email to