This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] CRIS sim and it's testsuite
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: edgar dot iglesias at axis dot com
- Cc: binutils at sourceware dot org, gdb-patches at sourceware dot org, hans-peter dot nilsson at axis dot com
- Date: Mon, 22 Oct 2007 18:07:46 +0200
- Subject: Re: [PATCH] CRIS sim and it's testsuite
(Binutils CC:ed, because it's the official home, which might
otherwise seem odd for a simulator-only CGEN port.)
> Date: Wed, 3 Oct 2007 16:58:48 +0200
> From: "Edgar E. Iglesias" <edgar@axis.com>
> The change introduces regressions in the tests for movu.b and
> movu.w, I verified with real CRISv32 hw that the test cases
> are OK so this seems to be an error in the simulator.
Indeed. Thanks for the analysis and sorry about the delay.
> I had a
> quick look at the cgen descriptions but saw no obvious errors,
> zero-extension seems do be done correctly for movu so I can't
> see why the N flag would get set.
Yeah, I had to stare at it a few minutes too. It's not obvious
until you see it. :-] A copy of the original operand isn't much
good for "testing" the zero-extended N flag even if you call it
"newval".
I adjusted movs too for consistency. Note that the other
movs/movu insns (with non-register source) already do the right
thing.
I regtested with the gcc testsuite for a month-old tree I had
convenient. Next: the testsuite patches.
src/cpu:
* cris.cpu (movs, movu): Use result of extension operation when
updating flags.
Most or all generated files changed because of some formatting
change (not the GPLv3 one) in the template, though the only
operational change is in cris/semcrisv{10,32}f-switch.c.
src/sim:
* cris/arch.c, cris/arch.h, cris/cpuall.h, cris/cpuv10.c,
cris/cpuv10.h, cris/cpuv32.c, cris/cpuv32.h, cris/cris-desc.c,
cris/cris-desc.h, cris/cris-opc.h, cris/decodev10.c,
cris/decodev10.h, cris/decodev32.c, cris/decodev32.h,
cris/modelv10.c, cris/modelv32.c, cris/semcrisv10f-switch.c,
cris/semcrisv32f-switch.c: Regenerate.
[Diff for generated files elided.]
Index: cris.cpu
===================================================================
RCS file: /cvs/src/src/cpu/cris.cpu,v
retrieving revision 1.6
diff -p -u -r1.6 cris.cpu
--- cris.cpu 5 Jul 2007 09:49:03 -0000 1.6
+++ cris.cpu 22 Oct 2007 15:51:25 -0000
@@ -2033,9 +2033,10 @@
(.pmacro
(BW)
(sequence
- ((BW newval))
- (set newval Rs)
- (set Rd (ext SI newval))
+ ((BW tmpops) (SI newval))
+ (set tmpops Rs)
+ (set newval (ext SI tmpops))
+ (set Rd newval)
(setf-move SI newval)))
)
@@ -2060,9 +2061,10 @@
(.pmacro
(BW)
(sequence
- ((BW newval))
- (set newval Rs)
- (set Rd (zext SI newval))
+ ((BW tmpops) (SI newval))
+ (set tmpops Rs)
+ (set newval (zext SI tmpops))
+ (set Rd newval)
(setf-move SI newval)))
)
brgds, H-P