1
0
mirror of https://github.com/golang/go synced 2024-11-19 15:14:45 -07:00

libmach: fix disassembly of FCMOVcc and FCOMI

The optable for 0xDB is handled specially.

This was the cause of a really weird bug
when using cov (386!) on the math package.

A real head-scratcher.

R=rsc
CC=golang-dev
https://golang.org/cl/4639066
This commit is contained in:
Anthony Martin 2011-06-23 09:32:29 -04:00 committed by Russ Cox
parent 8f72a87b4c
commit d847467041

View File

@ -1017,14 +1017,56 @@ static Optable optabDB[8+64] =
[0x03] = { 0,0, "FMOVLP F0,%e" }, [0x03] = { 0,0, "FMOVLP F0,%e" },
[0x05] = { 0,0, "FMOVX %e,F0" }, [0x05] = { 0,0, "FMOVX %e,F0" },
[0x07] = { 0,0, "FMOVXP F0,%e" }, [0x07] = { 0,0, "FMOVXP F0,%e" },
[0x08] = { 0,0, "FCMOVCC %f,F0" }, [0x08] = { 0,0, "FCMOVCC F0,F0" }, /* Mod R/M = 11xx xxxx*/
[0x09] = { 0,0, "FCMOVNE %f,F0" }, [0x09] = { 0,0, "FCMOVCC F1,F0" },
[0x0a] = { 0,0, "FCMOVHI %f,F0" }, [0x0a] = { 0,0, "FCMOVCC F2,F0" },
[0x0b] = { 0,0, "FCMOVNU %f,F0" }, [0x0b] = { 0,0, "FCMOVCC F3,F0" },
[0x0d] = { 0,0, "FUCOMI F0,%f" }, [0x0c] = { 0,0, "FCMOVCC F4,F0" },
[0x0e] = { 0,0, "FCOMI F0,%f" }, [0x0d] = { 0,0, "FCMOVCC F5,F0" },
[0x0e] = { 0,0, "FCMOVCC F6,F0" },
[0x0f] = { 0,0, "FCMOVCC F7,F0" },
[0x10] = { 0,0, "FCMOVNE F0,F0" },
[0x11] = { 0,0, "FCMOVNE F1,F0" },
[0x12] = { 0,0, "FCMOVNE F2,F0" },
[0x13] = { 0,0, "FCMOVNE F3,F0" },
[0x14] = { 0,0, "FCMOVNE F4,F0" },
[0x15] = { 0,0, "FCMOVNE F5,F0" },
[0x16] = { 0,0, "FCMOVNE F6,F0" },
[0x17] = { 0,0, "FCMOVNE F7,F0" },
[0x18] = { 0,0, "FCMOVHI F0,F0" },
[0x19] = { 0,0, "FCMOVHI F1,F0" },
[0x1a] = { 0,0, "FCMOVHI F2,F0" },
[0x1b] = { 0,0, "FCMOVHI F3,F0" },
[0x1c] = { 0,0, "FCMOVHI F4,F0" },
[0x1d] = { 0,0, "FCMOVHI F5,F0" },
[0x1e] = { 0,0, "FCMOVHI F6,F0" },
[0x1f] = { 0,0, "FCMOVHI F7,F0" },
[0x20] = { 0,0, "FCMOVNU F0,F0" },
[0x21] = { 0,0, "FCMOVNU F1,F0" },
[0x22] = { 0,0, "FCMOVNU F2,F0" },
[0x23] = { 0,0, "FCMOVNU F3,F0" },
[0x24] = { 0,0, "FCMOVNU F4,F0" },
[0x25] = { 0,0, "FCMOVNU F5,F0" },
[0x26] = { 0,0, "FCMOVNU F6,F0" },
[0x27] = { 0,0, "FCMOVNU F7,F0" },
[0x2a] = { 0,0, "FCLEX" }, [0x2a] = { 0,0, "FCLEX" },
[0x2b] = { 0,0, "FINIT" }, [0x2b] = { 0,0, "FINIT" },
[0x30] = { 0,0, "FUCOMI F0,F0" },
[0x31] = { 0,0, "FUCOMI F1,F0" },
[0x32] = { 0,0, "FUCOMI F2,F0" },
[0x33] = { 0,0, "FUCOMI F3,F0" },
[0x34] = { 0,0, "FUCOMI F4,F0" },
[0x35] = { 0,0, "FUCOMI F5,F0" },
[0x36] = { 0,0, "FUCOMI F6,F0" },
[0x37] = { 0,0, "FUCOMI F7,F0" },
[0x38] = { 0,0, "FCOMI F0,F0" },
[0x39] = { 0,0, "FCOMI F1,F0" },
[0x3a] = { 0,0, "FCOMI F2,F0" },
[0x3b] = { 0,0, "FCOMI F3,F0" },
[0x3c] = { 0,0, "FCOMI F4,F0" },
[0x3d] = { 0,0, "FCOMI F5,F0" },
[0x3e] = { 0,0, "FCOMI F6,F0" },
[0x3f] = { 0,0, "FCOMI F7,F0" },
}; };
static Optable optabDC[8+8] = static Optable optabDC[8+8] =