This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

simulator "branch"



Hi!

I have defined two insn that looks like this;

  (dni jalr "jalr"
       (DELAY-SLOT)
       "l.jalr $rA"
       (+ OP1_0 OP2_5 OP22_0 OP23_1 rA uimm-16)
       (sequence((WI tmp-slot))
                (set tmp-slot rA)
                (set (reg h-gr 11) (add pc 4))
                (set pc tmp-slot)
       )
       ()
  )

  (dni sys "sys"
       (DELAY-SLOT)
       "l.sys ${uimm-16}"
       (+ OP1_0 OP2_5 OP22_2 OP23_0 rA uimm-16)
       (set pc #xc00)
       ()
  )

Both insn are (from my point of view) very simple and should not
create any problems (I guess).  But when simulating them, the last
insn ("sys") doesn't effect the program counter.  Here's the trace.

0x001230 #139  uos_msgsnd      l.sys 0x1         - pc <- 0xc00
0x001234 #139  uos_msgsnd      l.nop             -
0x001238 #139  uos_msgsnd      l.nop             -
...

0x000da0 #37   printf          l.jalr r11        - gr-11 <- 0xda4, pc <- 0x192c
0x000da4 #37   printf          l.nop             -
0x00192c #23   task1           l.sb -43(r2),r4   - memory <- 0x0

I have looked at the generated sematic code, and I can't find any 
different between them that could cause this result.  Any ideas ?

-- 
johan

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]