load reverse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

   I am new to GCC. I was working in an Embedded processor with
GCC-4.6.4 version.

   I need to add load/store reverse instructions to the MD file.

   My instructions will look as below:

   LWX Rd,Ra,Rb

    operation: Addr := Ra + Rb
                    Rd := *Addr    (loading data with the opposite endianness)

      SWX Rd,Ra,Rb

     operation: Addr := Ra + Rb
                    *Addr := Rd    (storing data with the opposite endianness)



    To add the above instructions in to md file I tried below pattern in md file

     (define_insn "movsi_rev"
  [(set (match_operand:SI 0 "nonimmediate_operand" "=d,m")
        (bswap: SI (match_operand:SI 1 "move_src_operand"         "m,d")))]
  ""
  "@
   lwx\t%0,%1,%0
   swx\t%0,%1,%0"
  [(set_attr "type"     "load,store")
  (set_attr "mode"      "SI")
  (set_attr "length"    "4,4")])


   I wrote a small testcase which is generating swx instruction but
the operands are more due to which it is failing in assembler phase

   ex: instead of swx r0,r2,r0 it is generating swx r0,r2,0,r0

can anyone please help me in removing the extra operand in the above
instruction.

Thanks,
Sravan




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux