This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/36484] g++ generates code with illegal instruction on Pentium D / x86_64
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jun 2008 13:33:28 -0000
- Subject: [Bug target/36484] g++ generates code with illegal instruction on Pentium D / x86_64
- References: <bug-36484-6373@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from ubizjak at gmail dot com 2008-06-10 13:33 -------
Here is a short explanation from config/i386/i386.md on this matter:
--cut here--
;; We used to use "int $5", in honor of #BR which maps to interrupt vector 5.
;; That, however, is usually mapped by the OS to SIGSEGV, which is often
;; caught for use by garbage collectors and the like. Using an insn that
;; maps to SIGILL makes it more likely the program will rightfully die.
;; Keeping with tradition, "6" is in honor of #UD.
(define_insn "trap"
[(trap_if (const_int 1) (const_int 6))]
""
{ return ASM_SHORT "0x0b0f"; }
[(set_attr "length" "2")])
--cut here--
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36484