> On April 22, 2014, 4:54 a.m., Nathan Binkert wrote: > > src/sim/syscallreturn.hh, line 108 > > <http://reviews.gem5.org/r/2227/diff/1/?file=39538#file39538line108> > > > > If you're cleaning this up, why bother to continue storing success? > > Steve Reinhardt wrote: > On some platforms, the syscall return uses multiple registers, so it's > theoretically possible to have a successful syscall that has a return value > in the 0 > retval > -4096 range. Having the separate flag lets us represent > that. The old code had an additional constructor that took the success flag > explicitly, so we could actually create such instances (not just represent > them), but it was unused so I got rid of it. I could add that constructor > back just to document the possibility, if you think that would be helpful.
I'd buy the argument if the variable wasn't private, but because it is, it's simply an implementation that has the possibility of being extended in a certain way, but is not currently that way. I'm surprised that you'd even consider adding the constructor back. What happened to Professor Steve "Don't overgeneralize your APIs" Reinhardt? :) Anyway, too many words typed about this topic in general. Certainly not worth the length of discussion we've had already. It's certainly not terrible. - Nathan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviews.gem5.org/r/2227/#review5017 ----------------------------------------------------------- On April 21, 2014, 7:15 p.m., Steve Reinhardt wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://reviews.gem5.org/r/2227/ > ----------------------------------------------------------- > > (Updated April 21, 2014, 7:15 p.m.) > > > Review request for Default. > > > Repository: gem5 > > > Description > ------- > > Changeset 10162:5cfa2de6a6f6 > --------------------------- > syscall emulation: clean up & comment SyscallReturn > > > Diffs > ----- > > src/arch/alpha/process.cc ae43fc4d78cbf8190838147190c2009a9811f175 > src/arch/arm/process.cc ae43fc4d78cbf8190838147190c2009a9811f175 > src/arch/mips/process.cc ae43fc4d78cbf8190838147190c2009a9811f175 > src/arch/power/process.cc ae43fc4d78cbf8190838147190c2009a9811f175 > src/arch/sparc/process.cc ae43fc4d78cbf8190838147190c2009a9811f175 > src/arch/x86/process.cc ae43fc4d78cbf8190838147190c2009a9811f175 > src/sim/syscall_emul.cc ae43fc4d78cbf8190838147190c2009a9811f175 > src/sim/syscallreturn.hh ae43fc4d78cbf8190838147190c2009a9811f175 > > Diff: http://reviews.gem5.org/r/2227/diff/ > > > Testing > ------- > > passes se/quick tests other than 70.tgen, which shouldn't matter > > > Thanks, > > Steve Reinhardt > > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
