shithub: mc

Download patch

ref: e625989736fb218b9e5b3792b130d84db4ae4f8d
parent: 71a77dbd7f8a317edf08c55edbfe3016e97ea7fc
author: Ori Bernstein <[email protected]>
date: Wed Jun 19 13:11:29 EDT 2013

Reformat the colourmap table.

--- a/6/ra.c
+++ b/6/ra.c
@@ -69,88 +69,30 @@
 /* Which regmap entry a register maps to */
 int colourmap[Nreg] = {
     /* byte */
-    [Ral] = 0,
-    [Rcl] = 1,
-    [Rdl] = 2,
-    [Rbl] = 3,
-    [Rsil] = 4,
-    [Rdil] = 5,
-    [Rr8b] = 6,
-    [Rr9b] = 7,
-    [Rr10b] = 8,
-    [Rr11b] = 9,
-    [Rr12b] = 10,
-    [Rr13b] = 11,
-    [Rr14b] = 12,
-    [Rr15b] = 13,
+    [Ral]     = 0,  [Rax]   = 0,  [Reax]  = 0,  [Rrax]  = 0,
+    [Rcl]     = 1,  [Rcx]   = 1,  [Recx]  = 1,  [Rrcx]  = 1,
+    [Rdl]     = 2,  [Rdx]   = 2,  [Redx]  = 2,  [Rrdx]  = 2,
+    [Rbl]     = 3,  [Rbx]   = 3,  [Rebx]  = 3,  [Rrbx]  = 3,
+    [Rsil]    = 4,  [Rsix]  = 4,  [Resi]  = 4,  [Rrsi]  = 4,
+    [Rdil]    = 5,  [Rdix]  = 5,  [Redi]  = 5,  [Rrdi]  = 5,
+    [Rr8b]    = 6,  [Rr8w]  = 6,  [Rr8d]  = 6,  [Rr8]   = 6,
+    [Rr9b]    = 7,  [Rr9w]  = 7,  [Rr9d]  = 7,  [Rr9]   = 7,
+    [Rr10b]   = 8,  [Rr10w] = 8,  [Rr10d] = 8,  [Rr10]  = 8,
+    [Rr11b]   = 9,  [Rr11w] = 9,  [Rr11d] = 9,  [Rr11]  = 9,
+    [Rr12b]   = 10, [Rr12w] = 10, [Rr12d] = 10, [Rr12]  = 10,
+    [Rr13b]   = 11, [Rr13w] = 11, [Rr13d] = 11, [Rr13]  = 11,
+    [Rr14b]   = 12, [Rr14w] = 12, [Rr14d] = 12, [Rr14]  = 12,
+    [Rr15b]   = 13, [Rr15w] = 13, [Rr15d] = 13, [Rr15]  = 13,
 
-    /* word */
-    [Rax] = 0,
-    [Rcx] = 1,
-    [Rdx] = 2,
-    [Rbx] = 3,
-    [Rsi] = 4,
-    [Rdi] = 5,
-    [Rr8w] = 6,
-    [Rr9w] = 7,
-    [Rr10w] = 8,
-    [Rr11w] = 9,
-    [Rr12w] = 10,
-    [Rr13w] = 11,
-    [Rr14w] = 12,
-    [Rr15w] = 13,
-
-    /* dword */
-    [Reax] = 0,
-    [Recx] = 1,
-    [Redx] = 2,
-    [Rebx] = 3,
-    [Resi] = 4,
-    [Redi] = 5,
-    [Rr8d] = 6,
-    [Rr9d] = 7,
-    [Rr10d] = 8,
-    [Rr11d] = 9,
-    [Rr12d] = 10,
-    [Rr13d] = 11,
-    [Rr14d] = 12,
-    [Rr15d] = 13,
-
-    /* qword */
-    [Rrax] = 0,
-    [Rrcx] = 1,
-    [Rrdx] = 2,
-    [Rrbx] = 3,
-    [Rrsi] = 4,
-    [Rrdi] = 5,
-    [Rr8] = 6,
-    [Rr9] = 7,
-    [Rr10] = 8,
-    [Rr11] = 9,
-    [Rr12] = 10,
-    [Rr13] = 11,
-    [Rr14] = 12,
-    [Rr15] = 13,
-
     /* float */
-    [Rxmm0f] = 16,
-    [Rxmm1f] = 17,
-    [Rxmm2f] = 18,
-    [Rxmm3f] = 19,
-    [Rxmm4f] = 20,
-    [Rxmm5f] = 21,
-    [Rxmm6f] = 22,
-    [Rxmm7f] = 23,
-
-    /* double */
-    [Rxmm0d] = 16,
-    [Rxmm1d] = 17,
-    [Rxmm2d] = 18,
-    [Rxmm3d] = 19,
-    [Rxmm4d] = 20,
-    [Rxmm5d] = 21,
-    [Rxmm6d] = 22,
-    [Rxmm7d] = 23,
+    [Rxmm0f] = 16,  [Rxmm0d] = 16,
+    [Rxmm1f] = 17,  [Rxmm1d] = 17,
+    [Rxmm2f] = 18,  [Rxmm2d] = 18,
+    [Rxmm3f] = 19,  [Rxmm3d] = 19,
+    [Rxmm4f] = 20,  [Rxmm4d] = 20,
+    [Rxmm5f] = 21,  [Rxmm5d] = 21,
+    [Rxmm6f] = 22,  [Rxmm6d] = 22,
+    [Rxmm7f] = 23,  [Rxmm7d] = 23,
 };
 
 /* %esp, %ebp are not in the allocatable pool */
--- a/test/float.myr
+++ b/test/float.myr
@@ -2,5 +2,8 @@
 
 /* basic sanity check on floating point operations. should return 84. */
 const main = {
+	/*
 	-> (42.0 + 42.0) castto(int)
+	*/
+	var v = 123.0
 }