On Mon, May 15, 2006 at 12:09:00AM +0800, Rémy Saissy wrote: > To manage the manipulation of the register class, I added entries in > the i386.md file. > > ;; get a value from a segment register. > (define_insn "store_seg" > [(set (match_operand:SI 0 "nonimmediate_operand" "") > (match_operand:SI 1 "general_operand" "s"))] > "" > "movl\t%1,%0")
Operand 0 should have a constraint of "=rm" or so. Operand 1 should have a predicate of "register_operand". > ;; set a value in a segment register. > (define_insn "load_seg" > [(set (match_operand:SI 0 "general_operand" "=s") > (match_operand:SI 1 "register_operand" ""))] > "" > "movl\t%1,%0") Operand 1 should have a predicate of "nonimmediate_operand" and a constraint of "rm". Also, aren't the segment registers HImode registers? Above, you wrote: > register short a __asm__ ("es"); ^^^^^ And have you adjusted HARD_REGNO_MODE_OK() and HARD_REGNO_NREGS() accordingly? -- Rask Ingemann Lambertsen