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") > > ;; 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")
I think you'll have to add "s" alternatives to the *movhi pattern instead of adding two new patterns, since otherwise there will be two nearly identical patterns and GCC might use the wrong one. If you need patterns named "store_seg" and "load_seg", use an expander. -- Rask Ingemann Lambertsen