Re: Strange insn rtx is emitted in a custom backend

2015-06-02 Thread Lev Yudalevich
Thanks a lot, Jeff! I was missing some stuff in TARGET_LEGITIMATE_CONSTANT_P. Lev. On Mon, Jun 1, 2015 at 11:35 PM, Jeff Law wrote: > On 06/01/2015 12:51 PM, Lev Yudalevich wrote: >> >> While working on a custom backend for quite a standard RISC-like >> architecture, I d

Strange insn rtx is emitted in a custom backend

2015-06-01 Thread Lev Yudalevich
While working on a custom backend for quite a standard RISC-like architecture, I defined 'high'/'lo_sum' patterns as follows: (define_insn "mov_high" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (match_operand:SI 1 "immediate_operand" "i")))] "" "mvup #high(%1), %0"

Re: How to define target-specific PSImode?

2009-12-07 Thread Lev Yudalevich
> Note that the m32c port uses PSImode, so it may offer some suggestions > as example code. Yes, that's right, but the m32c port uses it as a mode for pointers, while I'm trying to do it with scalars. Anyway, thank you very much.

Re: How to define target-specific PSImode?

2009-12-06 Thread Lev Yudalevich
Robert Dewar : > >> Lev Yudalevich wrote: >>> >>> However, when the resulting gcc compiler crashes (ICE) when it tries >>> to convert any integer into my new type. >> >> Plase report the specific crash as a bug report with full details, >> in

Re: How to define target-specific PSImode?

2009-12-06 Thread Lev Yudalevich
Bug 42310 has been added to the database http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42310 Thank you very much! Below is a copy of the bug report: The exact version of GCC: 4.4.1 The system type: Linux version 2.6.9-67.EL (Red Hat 3.4.6-8) The options given when GCC was configured/built: ../../

How to define target-specific PSImode?

2009-12-06 Thread Lev Yudalevich
Hi, I asked this question about a month ago at gcc-help, but got no answer, so... I'm trying to define a nonstandard type for 12-bit scalar variables based on a target-dependent PSI mode. In my TARGET-modes.def file I have PARTIAL_MODE_INT(SI) defined. During the backend's init_builtins processin

How to define PSImode for a target?

2009-11-22 Thread Lev Yudalevich
Hi, While working on a port for my custom target I'm looking for some advice on how to define a smaller-than-integer scalar mode. I'd like to use it together with __attribute__((__libgcc_cmp_return__)) mode attribute. In my target xx-modes.def file I have PARTIAL_MODE_INT(SI) defined. And my TARGE