[Mono-bugs] [Bug 61479][Wis] New - [PATCH] Make OP_MEMCPY and OP_MEMSET take a base

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 13 Jul 2004 11:45:38 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=61479

--- shadow/61479	2004-07-13 11:45:38.000000000 -0400
+++ shadow/61479.tmp.13631	2004-07-13 11:45:38.000000000 -0400
@@ -0,0 +1,33 @@
+Bug#: 61479
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [PATCH] Make OP_MEMCPY and OP_MEMSET take a base
+
+Before, we would emit constructs like:
+
+  3c:	8b 45 08             	mov    eax,DWORD PTR [ebp+8]
+  3f:	8d 4d ec             	lea    ecx,[ebp-20]
+  42:	8b 11                	mov    edx,DWORD PTR [ecx]
+  44:	89 10                	mov    DWORD PTR [eax],edx
+  46:	8b 51 04             	mov    edx,DWORD PTR [ecx+4]
+  49:	89 50 04             	mov    DWORD PTR [eax+4],edx
+  4c:	8b 51 08             	mov    edx,DWORD PTR [ecx+8]
+  4f:	89 50 08             	mov    DWORD PTR [eax+8],edx
+  52:	8b 49 0c             	mov    ecx,DWORD PTR [ecx+12]
+  55:	89 48 0c             	mov    DWORD PTR [eax+12],ecx
+
+for a memcpy. Rather than using the lea, patch makes us use [ebp-20] then
+[ebp-16] and so on. This allows us to avoid using the lea instruction.