* src/truetype/ttinterp.c (opcode_name): Improve mnemonics.

This commit is contained in:
Werner Lemberg 2019-05-21 09:58:51 +02:00
parent 8eafa52830
commit 262fce445a
2 changed files with 195 additions and 159 deletions

View File

@ -1,3 +1,7 @@
2019-05-21 Werner Lemberg <wl@gnu.org>
* src/truetype/ttinterp.c (opcode_name): Improve mnemonics.
2019-05-16 Werner Lemberg <wl@gnu.org>
[truetype] Actually scale varied CVT values.

View File

@ -654,23 +654,25 @@
/* opcodes are gathered in groups of 16 */
/* please keep the spaces as they are */
/* SVTCA y */ PACK( 0, 0 ),
/* SVTCA x */ PACK( 0, 0 ),
/* SPvTCA y */ PACK( 0, 0 ),
/* SPvTCA x */ PACK( 0, 0 ),
/* SFvTCA y */ PACK( 0, 0 ),
/* SFvTCA x */ PACK( 0, 0 ),
/* SPvTL // */ PACK( 2, 0 ),
/* SPvTL + */ PACK( 2, 0 ),
/* SFvTL // */ PACK( 2, 0 ),
/* SFvTL + */ PACK( 2, 0 ),
/* SPvFS */ PACK( 2, 0 ),
/* SFvFS */ PACK( 2, 0 ),
/* GPv */ PACK( 0, 2 ),
/* GFv */ PACK( 0, 2 ),
/* SFvTPv */ PACK( 0, 0 ),
/* 0x00 */
/* SVTCA[0] */ PACK( 0, 0 ),
/* SVTCA[1] */ PACK( 0, 0 ),
/* SPVTCA[0] */ PACK( 0, 0 ),
/* SPVTCA[1] */ PACK( 0, 0 ),
/* SFVTCA[0] */ PACK( 0, 0 ),
/* SFVTCA[1] */ PACK( 0, 0 ),
/* SPVTL[0] */ PACK( 2, 0 ),
/* SPVTL[1] */ PACK( 2, 0 ),
/* SFVTL[0] */ PACK( 2, 0 ),
/* SFVTL[1] */ PACK( 2, 0 ),
/* SPVFS */ PACK( 2, 0 ),
/* SFVFS */ PACK( 2, 0 ),
/* GPV */ PACK( 0, 2 ),
/* GFV */ PACK( 0, 2 ),
/* SFVTPV */ PACK( 0, 0 ),
/* ISECT */ PACK( 5, 0 ),
/* 0x10 */
/* SRP0 */ PACK( 1, 0 ),
/* SRP1 */ PACK( 1, 0 ),
/* SRP2 */ PACK( 1, 0 ),
@ -684,10 +686,11 @@
/* SMD */ PACK( 1, 0 ),
/* ELSE */ PACK( 0, 0 ),
/* JMPR */ PACK( 1, 0 ),
/* SCvTCi */ PACK( 1, 0 ),
/* SSwCi */ PACK( 1, 0 ),
/* SCVTCI */ PACK( 1, 0 ),
/* SSWCI */ PACK( 1, 0 ),
/* SSW */ PACK( 1, 0 ),
/* 0x20 */
/* DUP */ PACK( 1, 2 ),
/* POP */ PACK( 1, 0 ),
/* CLEAR */ PACK( 0, 0 ),
@ -695,7 +698,7 @@
/* DEPTH */ PACK( 0, 1 ),
/* CINDEX */ PACK( 1, 1 ),
/* MINDEX */ PACK( 1, 0 ),
/* AlignPTS */ PACK( 2, 0 ),
/* ALIGNPTS */ PACK( 2, 0 ),
/* INS_$28 */ PACK( 0, 0 ),
/* UTP */ PACK( 1, 0 ),
/* LOOPCALL */ PACK( 2, 0 ),
@ -705,6 +708,7 @@
/* MDAP[0] */ PACK( 1, 0 ),
/* MDAP[1] */ PACK( 1, 0 ),
/* 0x30 */
/* IUP[0] */ PACK( 0, 0 ),
/* IUP[1] */ PACK( 0, 0 ),
/* SHP[0] */ PACK( 0, 0 ), /* loops */
@ -717,17 +721,18 @@
/* IP */ PACK( 0, 0 ), /* loops */
/* MSIRP[0] */ PACK( 2, 0 ),
/* MSIRP[1] */ PACK( 2, 0 ),
/* AlignRP */ PACK( 0, 0 ), /* loops */
/* ALIGNRP */ PACK( 0, 0 ), /* loops */
/* RTDG */ PACK( 0, 0 ),
/* MIAP[0] */ PACK( 2, 0 ),
/* MIAP[1] */ PACK( 2, 0 ),
/* NPushB */ PACK( 0, 0 ),
/* NPushW */ PACK( 0, 0 ),
/* 0x40 */
/* NPUSHB */ PACK( 0, 0 ),
/* NPUSHW */ PACK( 0, 0 ),
/* WS */ PACK( 2, 0 ),
/* RS */ PACK( 1, 1 ),
/* WCvtP */ PACK( 2, 0 ),
/* RCvt */ PACK( 1, 1 ),
/* WCVTP */ PACK( 2, 0 ),
/* RCVT */ PACK( 1, 1 ),
/* GC[0] */ PACK( 1, 1 ),
/* GC[1] */ PACK( 1, 1 ),
/* SCFS */ PACK( 2, 0 ),
@ -735,10 +740,11 @@
/* MD[1] */ PACK( 2, 1 ),
/* MPPEM */ PACK( 0, 1 ),
/* MPS */ PACK( 0, 1 ),
/* FlipON */ PACK( 0, 0 ),
/* FlipOFF */ PACK( 0, 0 ),
/* FLIPON */ PACK( 0, 0 ),
/* FLIPOFF */ PACK( 0, 0 ),
/* DEBUG */ PACK( 1, 0 ),
/* 0x50 */
/* LT */ PACK( 2, 1 ),
/* LTEQ */ PACK( 2, 1 ),
/* GT */ PACK( 2, 1 ),
@ -752,10 +758,11 @@
/* AND */ PACK( 2, 1 ),
/* OR */ PACK( 2, 1 ),
/* NOT */ PACK( 1, 1 ),
/* DeltaP1 */ PACK( 1, 0 ),
/* DELTAP1 */ PACK( 1, 0 ),
/* SDB */ PACK( 1, 0 ),
/* SDS */ PACK( 1, 0 ),
/* 0x60 */
/* ADD */ PACK( 2, 1 ),
/* SUB */ PACK( 2, 1 ),
/* DIV */ PACK( 2, 1 ),
@ -773,14 +780,15 @@
/* NROUND[2] */ PACK( 1, 1 ),
/* NROUND[3] */ PACK( 1, 1 ),
/* WCvtF */ PACK( 2, 0 ),
/* DeltaP2 */ PACK( 1, 0 ),
/* DeltaP3 */ PACK( 1, 0 ),
/* DeltaCn[0] */ PACK( 1, 0 ),
/* DeltaCn[1] */ PACK( 1, 0 ),
/* DeltaCn[2] */ PACK( 1, 0 ),
/* 0x70 */
/* WCVTF */ PACK( 2, 0 ),
/* DELTAP2 */ PACK( 1, 0 ),
/* DELTAP3 */ PACK( 1, 0 ),
/* DELTAC1 */ PACK( 1, 0 ),
/* DELTAC2 */ PACK( 1, 0 ),
/* DELTAC3 */ PACK( 1, 0 ),
/* SROUND */ PACK( 1, 0 ),
/* S45Round */ PACK( 1, 0 ),
/* S45ROUND */ PACK( 1, 0 ),
/* JROT */ PACK( 2, 0 ),
/* JROF */ PACK( 2, 0 ),
/* ROFF */ PACK( 0, 0 ),
@ -790,23 +798,25 @@
/* SANGW */ PACK( 1, 0 ),
/* AA */ PACK( 1, 0 ),
/* FlipPT */ PACK( 0, 0 ), /* loops */
/* FlipRgON */ PACK( 2, 0 ),
/* FlipRgOFF */ PACK( 2, 0 ),
/* 0x80 */
/* FLIPPT */ PACK( 0, 0 ), /* loops */
/* FLIPRGON */ PACK( 2, 0 ),
/* FLIPRGOFF */ PACK( 2, 0 ),
/* INS_$83 */ PACK( 0, 0 ),
/* INS_$84 */ PACK( 0, 0 ),
/* ScanCTRL */ PACK( 1, 0 ),
/* SDPvTL[0] */ PACK( 2, 0 ),
/* SDPvTL[1] */ PACK( 2, 0 ),
/* GetINFO */ PACK( 1, 1 ),
/* SCANCTRL */ PACK( 1, 0 ),
/* SDPVTL[0] */ PACK( 2, 0 ),
/* SDPVTL[1] */ PACK( 2, 0 ),
/* GETINFO */ PACK( 1, 1 ),
/* IDEF */ PACK( 1, 0 ),
/* ROLL */ PACK( 3, 3 ),
/* MAX */ PACK( 2, 1 ),
/* MIN */ PACK( 2, 1 ),
/* ScanTYPE */ PACK( 1, 0 ),
/* InstCTRL */ PACK( 2, 0 ),
/* SCANTYPE */ PACK( 1, 0 ),
/* INSTCTRL */ PACK( 2, 0 ),
/* INS_$8F */ PACK( 0, 0 ),
/* 0x90 */
/* INS_$90 */ PACK( 0, 0 ),
/* GETVAR */ PACK( 0, 0 ), /* will be handled specially */
/* GETDATA */ PACK( 0, 1 ),
@ -824,6 +834,7 @@
/* INS_$9E */ PACK( 0, 0 ),
/* INS_$9F */ PACK( 0, 0 ),
/* 0xA0 */
/* INS_$A0 */ PACK( 0, 0 ),
/* INS_$A1 */ PACK( 0, 0 ),
/* INS_$A2 */ PACK( 0, 0 ),
@ -841,23 +852,25 @@
/* INS_$AE */ PACK( 0, 0 ),
/* INS_$AF */ PACK( 0, 0 ),
/* PushB[0] */ PACK( 0, 1 ),
/* PushB[1] */ PACK( 0, 2 ),
/* PushB[2] */ PACK( 0, 3 ),
/* PushB[3] */ PACK( 0, 4 ),
/* PushB[4] */ PACK( 0, 5 ),
/* PushB[5] */ PACK( 0, 6 ),
/* PushB[6] */ PACK( 0, 7 ),
/* PushB[7] */ PACK( 0, 8 ),
/* PushW[0] */ PACK( 0, 1 ),
/* PushW[1] */ PACK( 0, 2 ),
/* PushW[2] */ PACK( 0, 3 ),
/* PushW[3] */ PACK( 0, 4 ),
/* PushW[4] */ PACK( 0, 5 ),
/* PushW[5] */ PACK( 0, 6 ),
/* PushW[6] */ PACK( 0, 7 ),
/* PushW[7] */ PACK( 0, 8 ),
/* 0xB0 */
/* PUSHB[0] */ PACK( 0, 1 ),
/* PUSHB[1] */ PACK( 0, 2 ),
/* PUSHB[2] */ PACK( 0, 3 ),
/* PUSHB[3] */ PACK( 0, 4 ),
/* PUSHB[4] */ PACK( 0, 5 ),
/* PUSHB[5] */ PACK( 0, 6 ),
/* PUSHB[6] */ PACK( 0, 7 ),
/* PUSHB[7] */ PACK( 0, 8 ),
/* PUSHW[0] */ PACK( 0, 1 ),
/* PUSHW[1] */ PACK( 0, 2 ),
/* PUSHW[2] */ PACK( 0, 3 ),
/* PUSHW[3] */ PACK( 0, 4 ),
/* PUSHW[4] */ PACK( 0, 5 ),
/* PUSHW[5] */ PACK( 0, 6 ),
/* PUSHW[6] */ PACK( 0, 7 ),
/* PUSHW[7] */ PACK( 0, 8 ),
/* 0xC0 */
/* MDRP[00] */ PACK( 1, 0 ),
/* MDRP[01] */ PACK( 1, 0 ),
/* MDRP[02] */ PACK( 1, 0 ),
@ -875,6 +888,7 @@
/* MDRP[14] */ PACK( 1, 0 ),
/* MDRP[15] */ PACK( 1, 0 ),
/* 0xD0 */
/* MDRP[16] */ PACK( 1, 0 ),
/* MDRP[17] */ PACK( 1, 0 ),
/* MDRP[18] */ PACK( 1, 0 ),
@ -892,6 +906,7 @@
/* MDRP[30] */ PACK( 1, 0 ),
/* MDRP[31] */ PACK( 1, 0 ),
/* 0xE0 */
/* MIRP[00] */ PACK( 2, 0 ),
/* MIRP[01] */ PACK( 2, 0 ),
/* MIRP[02] */ PACK( 2, 0 ),
@ -909,6 +924,7 @@
/* MIRP[14] */ PACK( 2, 0 ),
/* MIRP[15] */ PACK( 2, 0 ),
/* 0xF0 */
/* MIRP[16] */ PACK( 2, 0 ),
/* MIRP[17] */ PACK( 2, 0 ),
/* MIRP[18] */ PACK( 2, 0 ),
@ -937,23 +953,25 @@
static
const char* const opcode_name[256] =
{
"7 SVTCA y",
"7 SVTCA x",
"8 SPvTCA y",
"8 SPvTCA x",
"8 SFvTCA y",
"8 SFvTCA x",
"8 SPvTL ||",
"7 SPvTL +",
"8 SFvTL ||",
"7 SFvTL +",
"5 SPvFS",
"5 SFvFS",
"3 GPv",
"3 GFv",
"6 SFvTPv",
/* 0x00 */
"8 SVTCA[y]",
"8 SVTCA[x]",
"9 SPVTCA[y]",
"9 SPVTCA[x]",
"9 SFVTCA[y]",
"9 SFVTCA[x]",
"9 SPVTL[||]",
"8 SPVTL[+]",
"9 SFVTL[||]",
"8 SFVTL[+]",
"5 SPVFS",
"5 SFVFS",
"3 GPV",
"3 GFV",
"6 SFVTPV",
"5 ISECT",
/* 0x10 */
"4 SRP0",
"4 SRP1",
"4 SRP2",
@ -967,10 +985,11 @@
"3 SMD",
"4 ELSE",
"4 JMPR",
"6 SCvTCi",
"5 SSwCi",
"6 SCVTCI",
"5 SSWCI",
"3 SSW",
/* 0x20 */
"3 DUP",
"3 POP",
"5 CLEAR",
@ -978,50 +997,53 @@
"5 DEPTH",
"6 CINDEX",
"6 MINDEX",
"8 AlignPTS",
"8 ALIGNPTS",
"7 INS_$28",
"3 UTP",
"8 LOOPCALL",
"4 CALL",
"4 FDEF",
"4 ENDF",
"7 MDAP[0]",
"7 MDAP[1]",
"6 MDAP[]",
"9 MDAP[rnd]",
"6 IUP[0]",
"6 IUP[1]",
"6 SHP[0]",
"6 SHP[1]",
"6 SHC[0]",
"6 SHC[1]",
"6 SHZ[0]",
"6 SHZ[1]",
/* 0x30 */
"6 IUP[y]",
"6 IUP[x]",
"8 SHP[rp2]",
"8 SHP[rp1]",
"8 SHC[rp2]",
"8 SHC[rp1]",
"8 SHZ[rp2]",
"8 SHZ[rp1]",
"5 SHPIX",
"2 IP",
"8 MSIRP[0]",
"8 MSIRP[1]",
"7 AlignRP",
"7 MSIRP[]",
"A MSIRP[rp0]",
"7 ALIGNRP",
"4 RTDG",
"7 MIAP[0]",
"7 MIAP[1]",
"6 MIAP[]",
"9 MIAP[rnd]",
"6 NPushB",
"6 NPushW",
/* 0x40 */
"6 NPUSHB",
"6 NPUSHW",
"2 WS",
"2 RS",
"5 WCvtP",
"4 RCvt",
"5 GC[0]",
"5 GC[1]",
"5 WCVTP",
"4 RCVT",
"8 GC[curr]",
"8 GC[orig]",
"4 SCFS",
"5 MD[0]",
"5 MD[1]",
"8 MD[curr]",
"8 MD[orig]",
"5 MPPEM",
"3 MPS",
"6 FlipON",
"7 FlipOFF",
"6 FLIPON",
"7 FLIPOFF",
"5 DEBUG",
/* 0x50 */
"2 LT",
"4 LTEQ",
"2 GT",
@ -1035,10 +1057,11 @@
"3 AND",
"2 OR",
"3 NOT",
"7 DeltaP1",
"7 DELTAP1",
"3 SDB",
"3 SDS",
/* 0x60 */
"3 ADD",
"3 SUB",
"3 DIV",
@ -1047,23 +1070,24 @@
"3 NEG",
"5 FLOOR",
"7 CEILING",
"8 ROUND[0]",
"8 ROUND[1]",
"8 ROUND[2]",
"8 ROUND[3]",
"9 NROUND[0]",
"9 NROUND[1]",
"9 NROUND[2]",
"9 NROUND[3]",
"8 ROUND[G]",
"8 ROUND[B]",
"8 ROUND[W]",
"7 ROUND[]",
"9 NROUND[G]",
"9 NROUND[B]",
"9 NROUND[W]",
"8 NROUND[]",
"5 WCvtF",
"7 DeltaP2",
"7 DeltaP3",
"A DeltaCn[0]",
"A DeltaCn[1]",
"A DeltaCn[2]",
/* 0x70 */
"5 WCVTF",
"7 DELTAP2",
"7 DELTAP3",
"7 DELTAC1",
"7 DELTAC2",
"7 DELTAC3",
"6 SROUND",
"8 S45Round",
"8 S45ROUND",
"4 JROT",
"4 JROF",
"4 ROFF",
@ -1073,26 +1097,28 @@
"5 SANGW",
"2 AA",
"6 FlipPT",
"8 FlipRgON",
"9 FlipRgOFF",
/* 0x80 */
"6 FLIPPT",
"8 FLIPRGON",
"9 FLIPRGOFF",
"7 INS_$83",
"7 INS_$84",
"8 ScanCTRL",
"9 SDPvTL[0]",
"9 SDPvTL[1]",
"7 GetINFO",
"8 SCANCTRL",
"A SDPVTL[||]",
"9 SDPVTL[+]",
"7 GETINFO",
"4 IDEF",
"4 ROLL",
"3 MAX",
"3 MIN",
"8 ScanTYPE",
"8 InstCTRL",
"8 SCANTYPE",
"8 INSTCTRL",
"7 INS_$8F",
/* 0x90 */
"7 INS_$90",
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
"6 GETVAR",
"C GETVARIATION",
"7 GETDATA",
#else
"7 INS_$91",
@ -1112,6 +1138,7 @@
"7 INS_$9E",
"7 INS_$9F",
/* 0xA0 */
"7 INS_$A0",
"7 INS_$A1",
"7 INS_$A2",
@ -1129,90 +1156,95 @@
"7 INS_$AE",
"7 INS_$AF",
"8 PushB[0]",
"8 PushB[1]",
"8 PushB[2]",
"8 PushB[3]",
"8 PushB[4]",
"8 PushB[5]",
"8 PushB[6]",
"8 PushB[7]",
"8 PushW[0]",
"8 PushW[1]",
"8 PushW[2]",
"8 PushW[3]",
"8 PushW[4]",
"8 PushW[5]",
"8 PushW[6]",
"8 PushW[7]",
/* 0xB0 */
"8 PUSHB[0]",
"8 PUSHB[1]",
"8 PUSHB[2]",
"8 PUSHB[3]",
"8 PUSHB[4]",
"8 PUSHB[5]",
"8 PUSHB[6]",
"8 PUSHB[7]",
"8 PUSHW[0]",
"8 PUSHW[1]",
"8 PUSHW[2]",
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