<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
> mostly resolve the double shift source vs. dest problem<BR><BR>
Clarification, I don't know of any bug here, just that <BR>
- the code looked wrong but acted right <BR>
- the debug output was probably wrong and definitely a little bit missing (I'm sure nobody ever runs cm3 -debug<BR>
and looks at NT386/foo.molog, but I've been doing that a lot lately, it is similar<BR>
to cm3cg -y, but shows the generated code as well, interleaved).<BR>
<BR>
<BR>
The actual generated code seemed ok, based on stuff in m3-sys/m3tests.<BR>
"mostly resolve" as in, the code reads more sensibly now, though<BR>
there is too much code duplication, build_modrm isn't as useful as it should be..<BR>
<BR>
Also "double shift" doesn't mean "extra shift", but "double precision shift" -- 64bit shift.<BR>
x86 has the instructions shld and shrd, shift left double, shift right double.<BR>
You shift a register "into" another a register, instead of shifting in zeros or sign bits.<BR>
<BR>
- Jay<BR> <BR>> Date: Sun, 28 Feb 2010 00:52:38 +0000<BR>> To: m3commit@elegosoft.com<BR>> From: jkrell@elego.de<BR>> Subject: [M3commit] CVS Update: cm3<BR>> <BR>> CVSROOT: /usr/cvs<BR>> Changes by: jkrell@birch. 10/02/28 00:52:37<BR>> <BR>> Modified files:<BR>> cm3/m3-sys/m3back/src/: Codex86.m3 M3x86.m3 M3x86Rep.i3 <BR>> Stackx86.m3 <BR>> <BR>> Log message:<BR>> mostly resolve the double shift source vs. dest problem<BR>> the underlying helper function sometimes reverses dest and src, in the<BR>> interest of getting reg, mem<BR>> These helper functions need cleanup and unification.<BR>> build_modrm, load_like_helper, etc.<BR>> <BR>> abtract out some assumptions of 32bit sizes to be type-based<BR>> so that we might inline some shift/insert/extract<BR>> no actual bug here, only 32bit types get here currently, the<BR>> rest generate function calls<BR>> <BR> </body>
</html>