Newer
Older
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fclose");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fflush");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fopen");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("freopen");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1 | STARS_ARG_POS_2);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("setbuf");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("setvbuf");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fprintf");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fscanf");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("printf");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("scanf");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("sprintf");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("sscanf");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("vfprintf");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("vprintf");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("vsprintf");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fgetc");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fgets");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_2);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fputc");
MapEntry.second = STARS_ARG_POS_1;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fputs");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("getc");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("gets");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("putc");
MapEntry.second = STARS_ARG_POS_1;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("puts");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("ungetc");
MapEntry.second = STARS_ARG_POS_1;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fread");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_3);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fwrite");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_3);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fgetpos");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fseek");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("fsetpos");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_1);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("ftell");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("rewind");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("clearerr");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("feof");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("ferror");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("perror");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
// <time.h>
MapEntry.first = string("mktime");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("time");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("asctime");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("ctime");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("gmtime");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("localtime");
MapEntry.second = STARS_ARG_POS_0;
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = string("strftime");
MapEntry.second = (STARS_ARG_POS_0 | STARS_ARG_POS_2 | STARS_ARG_POS_3);
InsertResult = PointerArgPositionMap.insert(MapEntry);
assert(InsertResult.second);
return;
} // end of InitPointerArgPositionMap()
// Return POINTER arg position bitset for call name from the POINTER arg map.
// If we don't find the call name, we return 0 in ArgPosBits.
void GetPointerArgPositionsForCallName(string CalleeName, unsigned int &ArgPosBits) {
map<string, unsigned int>::iterator MapIter;
ArgPosBits = 0; // Change if found later
MapIter = PointerArgPositionMap.find(CalleeName);
if (MapIter != PointerArgPositionMap.end()) { // found it
ArgPosBits = MapIter->second;
}
return;
}
// Utility to count bits set in an unsigned int, e.g. ArgPosBits.
unsigned int CountBitsSet(unsigned int ArgPosBits) {
unsigned int count; // count accumulates the total bits set in ArgPosBits
for (count = 0; ArgPosBits; ++count) {
ArgPosBits &= (ArgPosBits - 1); // clear the least significant bit set
}
// Brian Kernighan's method goes through as many iterations as there are set bits.
// So if we have a 32-bit word with only the high bit set, then it will only go once through the loop.
// Published in 1988, the C Programming Language 2nd Ed. (by Brian W. Kernighan and Dennis M. Ritchie) mentions this in exercise 2-9.
// On April 19, 2006 Don Knuth pointed out to me that this method "was first published by Peter Wegner in CACM 3 (1960), 322.
// (Also discovered independently by Derrick Lehmer and published in 1964 in a book edited by Beckenbach.)"
return count;
}
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
// Initialize the FG info for the return register from any library function
// whose name implies that we know certain return values (e.g. atoi() returns
// a signed integer, while strtoul() returns an unsigned long).
void GetLibFuncFGInfo(string FuncName, struct FineGrainedInfo &InitFGInfo) {
map<string, struct FineGrainedInfo>::iterator FindIter;
FindIter = ReturnRegisterTypeMap.find(FuncName);
if (FindIter == ReturnRegisterTypeMap.end()) { // not found
InitFGInfo.SignMiscInfo = 0;
InitFGInfo.SizeInfo = 0;
}
else { // found
InitFGInfo = FindIter->second;
}
return;
} // end of GetLibFuncFGInfo()
// Initialize the lookup maps that are used to define the FG info that can
// be inferred from a library function name.
void InitLibFuncFGInfoMaps(void) {
op_t DummyOp = InitOp;
struct FineGrainedInfo FGEntry;
pair<string, struct FineGrainedInfo> MapEntry;
pair<map<string, struct FineGrainedInfo>::iterator, bool> InsertResult;
// Add functions that return signed integers.
FGEntry.SignMiscInfo = FG_MASK_SIGNED;
FGEntry.SizeInfo = (FG_MASK_INTEGER | ComputeOperandBitWidthMask(DummyOp, sizeof(int)));
MapEntry.second = FGEntry;
MapEntry.first = "atoi";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strcmp";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strcoll";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
MapEntry.first = "strncmp";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "memcmp";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "isalnum";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "isalpha";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "islower";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "isupper";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "isdigit";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "isxdigit";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "iscntrl";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "isgraph";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "isblank";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "isspace";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "isprint";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "ispunct";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
// Functions that return signed longs.
if (sizeof(long int) != sizeof(int)) {
FGEntry.SizeInfo = (FG_MASK_INTEGER | ComputeOperandBitWidthMask(DummyOp, sizeof(long int)));
MapEntry.second = FGEntry;
}
MapEntry.first = "atol";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strtol";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
// Functions that return signed long longs.
if (sizeof(long long int) != sizeof(long int)) {
FGEntry.SizeInfo = (FG_MASK_INTEGER | ComputeOperandBitWidthMask(DummyOp, sizeof(long long int)));
MapEntry.second = FGEntry;
}
MapEntry.first = "atoll";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strtoll";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
// Functions that return unsigned long longs.
FGEntry.SignMiscInfo = FG_MASK_UNSIGNED;
MapEntry.second = FGEntry;
MapEntry.first = "strtoull";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
// Functions that return unsigned longs.
if (sizeof(long long int) != sizeof(long int)) {
FGEntry.SizeInfo = (FG_MASK_INTEGER | ComputeOperandBitWidthMask(DummyOp, sizeof(long int)));
MapEntry.second = FGEntry;
}
MapEntry.first = "strtoul";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
// Functions that return size_t.
FGEntry.SizeInfo = (FG_MASK_INTEGER | ComputeOperandBitWidthMask(DummyOp, sizeof(size_t)));
FGEntry.SignMiscInfo = FG_MASK_UNSIGNED;
MapEntry.second = FGEntry;
MapEntry.first = "strlen";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strxfrm";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strspn";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strcspn";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strftime";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
// Functions that return (char *).
FGEntry.SizeInfo = (FG_MASK_DATAPOINTER | ComputeOperandBitWidthMask(DummyOp, sizeof(char *)));
FGEntry.SignMiscInfo = FG_MASK_UNSIGNED;
MapEntry.second = FGEntry;
MapEntry.first = "strcpy";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strncpy";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strcat";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strncat";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strchr";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strrchr";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strpbrk";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strstr";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strtok";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "strerror";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "asctime";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "ctime";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
// Functions that return (void *) or a similar data pointer.
FGEntry.SizeInfo = (FG_MASK_DATAPOINTER | ComputeOperandBitWidthMask(DummyOp, sizeof(void *)));
FGEntry.SignMiscInfo = FG_MASK_UNSIGNED;
MapEntry.second = FGEntry;
MapEntry.first = "setlocale";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "localeconv";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
MapEntry.first = "malloc";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "calloc";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "realloc";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "memchr";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "memcpy";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "mempcpy"; // non-standard, found in glibc
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "memmove";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "memset";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "gmtime";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
MapEntry.first = "localtime";
InsertResult = ReturnRegisterTypeMap.insert(MapEntry);
assert(InsertResult.second);
// Functions that return bool.
FGEntry.SizeInfo = (FG_MASK_INTEGER | ComputeOperandBitWidthMask(DummyOp, sizeof(bool)));
FGEntry.SignMiscInfo = FG_MASK_UNSIGNED;
MapEntry.second = FGEntry;
// NOTE: Add <math.h> functions later.
return;
} // end of InitLibFuncFGInfoMaps()
// Initialize the DFACategory[] array to define instruction classes
// for the purposes of data flow analysis.
void InitDFACategory(void) {
// Default category is 0, not the start or end of a basic block.
(void) memset(DFACategory, 0, sizeof(DFACategory));
DFACategory[NN_call] = CALL; // Call Procedure
DFACategory[NN_callfi] = INDIR_CALL; // Indirect Call Far Procedure
DFACategory[NN_callni] = INDIR_CALL; // Indirect Call Near Procedure
DFACategory[NN_hlt] = HALT; // Halt
DFACategory[NN_int] = INDIR_CALL; // Call to Interrupt Procedure
DFACategory[NN_into] = INDIR_CALL; // Call to Interrupt Procedure if Overflow Flag = 1
DFACategory[NN_int3] = INDIR_CALL; // Trap to Debugger
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
DFACategory[NN_iretw] = RETURN; // Interrupt Return
DFACategory[NN_iret] = RETURN; // Interrupt Return
DFACategory[NN_iretd] = RETURN; // Interrupt Return (use32)
DFACategory[NN_iretq] = RETURN; // Interrupt Return (use64)
DFACategory[NN_ja] = COND_BRANCH; // Jump if Above (CF=0 & ZF=0)
DFACategory[NN_jae] = COND_BRANCH; // Jump if Above or Equal (CF=0)
DFACategory[NN_jb] = COND_BRANCH; // Jump if Below (CF=1)
DFACategory[NN_jbe] = COND_BRANCH; // Jump if Below or Equal (CF=1 | ZF=1)
DFACategory[NN_jc] = COND_BRANCH; // Jump if Carry (CF=1)
DFACategory[NN_jcxz] = COND_BRANCH; // Jump if CX is 0
DFACategory[NN_jecxz] = COND_BRANCH; // Jump if ECX is 0
DFACategory[NN_jrcxz] = COND_BRANCH; // Jump if RCX is 0
DFACategory[NN_je] = COND_BRANCH; // Jump if Equal (ZF=1)
DFACategory[NN_jg] = COND_BRANCH; // Jump if Greater (ZF=0 & SF=OF)
DFACategory[NN_jge] = COND_BRANCH; // Jump if Greater or Equal (SF=OF)
DFACategory[NN_jl] = COND_BRANCH; // Jump if Less (SF!=OF)
DFACategory[NN_jle] = COND_BRANCH; // Jump if Less or Equal (ZF=1 | SF!=OF)
DFACategory[NN_jna] = COND_BRANCH; // Jump if Not Above (CF=1 | ZF=1)
DFACategory[NN_jnae] = COND_BRANCH; // Jump if Not Above or Equal (CF=1)
DFACategory[NN_jnb] = COND_BRANCH; // Jump if Not Below (CF=0)
DFACategory[NN_jnbe] = COND_BRANCH; // Jump if Not Below or Equal (CF=0 & ZF=0)
DFACategory[NN_jnc] = COND_BRANCH; // Jump if Not Carry (CF=0)
DFACategory[NN_jne] = COND_BRANCH; // Jump if Not Equal (ZF=0)
DFACategory[NN_jng] = COND_BRANCH; // Jump if Not Greater (ZF=1 | SF!=OF)
DFACategory[NN_jnge] = COND_BRANCH; // Jump if Not Greater or Equal (SF!=OF)
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
DFACategory[NN_jnl] = COND_BRANCH; // Jump if Not Less (SF=OF)
DFACategory[NN_jnle] = COND_BRANCH; // Jump if Not Less or Equal (ZF=0 & SF=OF)
DFACategory[NN_jno] = COND_BRANCH; // Jump if Not Overflow (OF=0)
DFACategory[NN_jnp] = COND_BRANCH; // Jump if Not Parity (PF=0)
DFACategory[NN_jns] = COND_BRANCH; // Jump if Not Sign (SF=0)
DFACategory[NN_jnz] = COND_BRANCH; // Jump if Not Zero (ZF=0)
DFACategory[NN_jo] = COND_BRANCH; // Jump if Overflow (OF=1)
DFACategory[NN_jp] = COND_BRANCH; // Jump if Parity (PF=1)
DFACategory[NN_jpe] = COND_BRANCH; // Jump if Parity Even (PF=1)
DFACategory[NN_jpo] = COND_BRANCH; // Jump if Parity Odd (PF=0)
DFACategory[NN_js] = COND_BRANCH; // Jump if Sign (SF=1)
DFACategory[NN_jz] = COND_BRANCH; // Jump if Zero (ZF=1)
DFACategory[NN_jmp] = JUMP; // Jump
DFACategory[NN_jmpfi] = INDIR_JUMP; // Indirect Far Jump
DFACategory[NN_jmpni] = INDIR_JUMP; // Indirect Near Jump
DFACategory[NN_jmpshort] = JUMP; // Jump Short (only in 64-bit mode)
DFACategory[NN_loopw] = COND_BRANCH; // Loop while ECX != 0
DFACategory[NN_loop] = COND_BRANCH; // Loop while CX != 0
DFACategory[NN_loopd] = COND_BRANCH; // Loop while ECX != 0
DFACategory[NN_loopq] = COND_BRANCH; // Loop while RCX != 0
DFACategory[NN_loopwe] = COND_BRANCH; // Loop while CX != 0 and ZF=1
DFACategory[NN_loope] = COND_BRANCH; // Loop while rCX != 0 and ZF=1
DFACategory[NN_loopde] = COND_BRANCH; // Loop while ECX != 0 and ZF=1
DFACategory[NN_loopqe] = COND_BRANCH; // Loop while RCX != 0 and ZF=1
DFACategory[NN_loopwne] = COND_BRANCH; // Loop while CX != 0 and ZF=0
DFACategory[NN_loopne] = COND_BRANCH; // Loop while rCX != 0 and ZF=0
DFACategory[NN_loopdne] = COND_BRANCH; // Loop while ECX != 0 and ZF=0
DFACategory[NN_loopqne] = COND_BRANCH; // Loop while RCX != 0 and ZF=0
DFACategory[NN_retn] = RETURN; // Return Near from Procedure
DFACategory[NN_retf] = RETURN; // Return Far from Procedure
//
// Pentium instructions
//
DFACategory[NN_rsm] = HALT; // Resume from System Management Mode
// Pentium II instructions
DFACategory[NN_sysenter] = CALL; // Fast Transition to System Call Entry Point
DFACategory[NN_sysexit] = CALL; // Fast Transition from System Call Entry Point
// AMD syscall/sysret instructions NOTE: not AMD, found in Intel manual
DFACategory[NN_syscall] = CALL; // Low latency system call
DFACategory[NN_sysret] = CALL; // Return from system call
// VMX instructions
DFACategory[NN_vmcall] = INDIR_CALL; // Call to VM Monitor
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
// Added with x86-64
// Geode LX 3DNow! extensions
// SSE2 pseudoinstructions
// SSSE4.1 instructions
// SSSE4.2 instructions
// AMD SSE4a instructions
// xsave/xrstor instructions
// Intel Safer Mode Extensions (SMX)
// AMD-V Virtualization ISA Extension
// VMX+ instructions
// Intel Atom instructions
// Intel AES instructions
// Carryless multiplication
// Returns modified by operand size prefixes
DFACategory[NN_retnw] = RETURN; // Return Near from Procedure (use16)
DFACategory[NN_retnd] = RETURN; // Return Near from Procedure (use32)
DFACategory[NN_retnq] = RETURN; // Return Near from Procedure (use64)
DFACategory[NN_retfw] = RETURN; // Return Far from Procedure (use16)
DFACategory[NN_retfd] = RETURN; // Return Far from Procedure (use32)
DFACategory[NN_retfq] = RETURN; // Return Far from Procedure (use64)
// RDRAND support
// new GPR instructions
// new AVX instructions
// Transactional Synchronization Extensions
// Virtual PC synthetic instructions
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
// Initialize the SMPDefsFlags[] array to define how we emit
// optimizing annotations.
void InitSMPDefsFlags(void) {
// Default value is true. Many instructions set the flags.
(void) memset(SMPDefsFlags, true, sizeof(SMPDefsFlags));
SMPDefsFlags[NN_null] = false; // Unknown Operation
SMPDefsFlags[NN_bound] = false; // Check Array Index Against Bounds
SMPDefsFlags[NN_call] = false; // Call Procedure
SMPDefsFlags[NN_callfi] = false; // Indirect Call Far Procedure
SMPDefsFlags[NN_callni] = false; // Indirect Call Near Procedure
SMPDefsFlags[NN_cbw] = false; // AL -> AX (with sign)
SMPDefsFlags[NN_cwde] = false; // AX -> EAX (with sign)
SMPDefsFlags[NN_cdqe] = false; // EAX -> RAX (with sign)
SMPDefsFlags[NN_clts] = false; // Clear Task-Switched Flag in CR0
SMPDefsFlags[NN_cwd] = false; // AX -> DX:AX (with sign)
SMPDefsFlags[NN_cdq] = false; // EAX -> EDX:EAX (with sign)
SMPDefsFlags[NN_cqo] = false; // RAX -> RDX:RAX (with sign)
SMPDefsFlags[NN_enterw] = false; // Make Stack Frame for Procedure Parameters
SMPDefsFlags[NN_enter] = false; // Make Stack Frame for Procedure Parameters
SMPDefsFlags[NN_enterd] = false; // Make Stack Frame for Procedure Parameters
SMPDefsFlags[NN_enterq] = false; // Make Stack Frame for Procedure Parameters
SMPDefsFlags[NN_hlt] = false; // Halt
SMPDefsFlags[NN_in] = false; // Input from Port
SMPDefsFlags[NN_ins] = false; // Input Byte(s) from Port to String
SMPDefsFlags[NN_iretw] = false; // Interrupt Return
SMPDefsFlags[NN_iret] = false; // Interrupt Return
SMPDefsFlags[NN_iretd] = false; // Interrupt Return (use32)
SMPDefsFlags[NN_iretq] = false; // Interrupt Return (use64)
SMPDefsFlags[NN_ja] = false; // Jump if Above (CF=0 & ZF=0)
SMPDefsFlags[NN_jae] = false; // Jump if Above or Equal (CF=0)
SMPDefsFlags[NN_jb] = false; // Jump if Below (CF=1)
SMPDefsFlags[NN_jbe] = false; // Jump if Below or Equal (CF=1 | ZF=1)
SMPDefsFlags[NN_jc] = false; // Jump if Carry (CF=1)
SMPDefsFlags[NN_jcxz] = false; // Jump if CX is 0
SMPDefsFlags[NN_jecxz] = false; // Jump if ECX is 0
SMPDefsFlags[NN_jrcxz] = false; // Jump if RCX is 0
SMPDefsFlags[NN_je] = false; // Jump if Equal (ZF=1)
SMPDefsFlags[NN_jg] = false; // Jump if Greater (ZF=0 & SF=OF)
SMPDefsFlags[NN_jge] = false; // Jump if Greater or Equal (SF=OF)
SMPDefsFlags[NN_jl] = false; // Jump if Less (SF!=OF)
SMPDefsFlags[NN_jle] = false; // Jump if Less or Equal (ZF=1 | SF!=OF)
SMPDefsFlags[NN_jna] = false; // Jump if Not Above (CF=1 | ZF=1)
SMPDefsFlags[NN_jnae] = false; // Jump if Not Above or Equal (CF=1)
SMPDefsFlags[NN_jnb] = false; // Jump if Not Below (CF=0)
SMPDefsFlags[NN_jnbe] = false; // Jump if Not Below or Equal (CF=0 & ZF=0)
SMPDefsFlags[NN_jnc] = false; // Jump if Not Carry (CF=0)
SMPDefsFlags[NN_jne] = false; // Jump if Not Equal (ZF=0)
SMPDefsFlags[NN_jng] = false; // Jump if Not Greater (ZF=1 | SF!=OF)
SMPDefsFlags[NN_jnge] = false; // Jump if Not Greater or Equal (SF!=OF)
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
SMPDefsFlags[NN_jnl] = false; // Jump if Not Less (SF=OF)
SMPDefsFlags[NN_jnle] = false; // Jump if Not Less or Equal (ZF=0 & SF=OF)
SMPDefsFlags[NN_jno] = false; // Jump if Not Overflow (OF=0)
SMPDefsFlags[NN_jnp] = false; // Jump if Not Parity (PF=0)
SMPDefsFlags[NN_jns] = false; // Jump if Not Sign (SF=0)
SMPDefsFlags[NN_jnz] = false; // Jump if Not Zero (ZF=0)
SMPDefsFlags[NN_jo] = false; // Jump if Overflow (OF=1)
SMPDefsFlags[NN_jp] = false; // Jump if Parity (PF=1)
SMPDefsFlags[NN_jpe] = false; // Jump if Parity Even (PF=1)
SMPDefsFlags[NN_jpo] = false; // Jump if Parity Odd (PF=0)
SMPDefsFlags[NN_js] = false; // Jump if Sign (SF=1)
SMPDefsFlags[NN_jz] = false; // Jump if Zero (ZF=1)
SMPDefsFlags[NN_jmp] = false; // Jump
SMPDefsFlags[NN_jmpfi] = false; // Indirect Far Jump
SMPDefsFlags[NN_jmpni] = false; // Indirect Near Jump
SMPDefsFlags[NN_jmpshort] = false; // Jump Short (not used)
SMPDefsFlags[NN_lahf] = false; // Load Flags into AH Register
SMPDefsFlags[NN_lea] = false; // Load Effective Address
SMPDefsFlags[NN_leavew] = false; // High Level Procedure Exit
SMPDefsFlags[NN_leave] = false; // High Level Procedure Exit
SMPDefsFlags[NN_leaved] = false; // High Level Procedure Exit
SMPDefsFlags[NN_leaveq] = false; // High Level Procedure Exit
SMPDefsFlags[NN_lgdt] = false; // Load Global Descriptor Table Register
SMPDefsFlags[NN_lidt] = false; // Load Interrupt Descriptor Table Register
SMPDefsFlags[NN_lgs] = false; // Load Full Pointer to GS:xx
SMPDefsFlags[NN_lss] = false; // Load Full Pointer to SS:xx
SMPDefsFlags[NN_lds] = false; // Load Full Pointer to DS:xx
SMPDefsFlags[NN_les] = false; // Load Full Pointer to ES:xx
SMPDefsFlags[NN_lfs] = false; // Load Full Pointer to FS:xx
SMPDefsFlags[NN_loopw] = false; // Loop while ECX != 0
SMPDefsFlags[NN_loop] = false; // Loop while ECX != 0
SMPDefsFlags[NN_loopwe] = false; // Loop while CX != 0 and ZF=1
SMPDefsFlags[NN_loope] = false; // Loop while rCX != 0 and ZF=1
SMPDefsFlags[NN_loopde] = false; // Loop while ECX != 0 and ZF=1
SMPDefsFlags[NN_loopqe] = false; // Loop while RCX != 0 and ZF=1
SMPDefsFlags[NN_loopwne] = false; // Loop while CX != 0 and ZF=0
SMPDefsFlags[NN_loopne] = false; // Loop while rCX != 0 and ZF=0
SMPDefsFlags[NN_loopdne] = false; // Loop while ECX != 0 and ZF=0
SMPDefsFlags[NN_loopqne] = false; // Loop while RCX != 0 and ZF=0
SMPDefsFlags[NN_ltr] = false; // Load Task Register
SMPDefsFlags[NN_mov] = false; // Move Data
SMPDefsFlags[NN_movsp] = true; // Move to/from Special Registers
SMPDefsFlags[NN_movs] = false; // Move Byte(s) from String to String
SMPDefsFlags[NN_movsx] = false; // Move with Sign-Extend
SMPDefsFlags[NN_movzx] = false; // Move with Zero-Extend
SMPDefsFlags[NN_nop] = false; // No Operation
SMPDefsFlags[NN_not] = false; // One's Complement Negation
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
SMPDefsFlags[NN_out] = false; // Output to Port
SMPDefsFlags[NN_outs] = false; // Output Byte(s) to Port
SMPDefsFlags[NN_pop] = false; // Pop a word from the Stack
SMPDefsFlags[NN_popaw] = false; // Pop all General Registers
SMPDefsFlags[NN_popa] = false; // Pop all General Registers
SMPDefsFlags[NN_popad] = false; // Pop all General Registers (use32)
SMPDefsFlags[NN_popaq] = false; // Pop all General Registers (use64)
SMPDefsFlags[NN_push] = false; // Push Operand onto the Stack
SMPDefsFlags[NN_pushaw] = false; // Push all General Registers
SMPDefsFlags[NN_pusha] = false; // Push all General Registers
SMPDefsFlags[NN_pushad] = false; // Push all General Registers (use32)
SMPDefsFlags[NN_pushaq] = false; // Push all General Registers (use64)
SMPDefsFlags[NN_pushfw] = false; // Push Flags Register onto the Stack
SMPDefsFlags[NN_pushf] = false; // Push Flags Register onto the Stack
SMPDefsFlags[NN_pushfd] = false; // Push Flags Register onto the Stack (use32)
SMPDefsFlags[NN_pushfq] = false; // Push Flags Register onto the Stack (use64)
SMPDefsFlags[NN_rep] = false; // Repeat String Operation
SMPDefsFlags[NN_repe] = false; // Repeat String Operation while ZF=1
SMPDefsFlags[NN_repne] = false; // Repeat String Operation while ZF=0
SMPDefsFlags[NN_retn] = false; // Return Near from Procedure
SMPDefsFlags[NN_retf] = false; // Return Far from Procedure
SMPDefsFlags[NN_sahf] = true; // Store AH into flags
SMPDefsFlags[NN_shl] = true; // Shift Logical Left
SMPDefsFlags[NN_shr] = true; // Shift Logical Right
SMPDefsFlags[NN_seta] = false; // Set Byte if Above (CF=0 & ZF=0)
SMPDefsFlags[NN_setae] = false; // Set Byte if Above or Equal (CF=0)
SMPDefsFlags[NN_setb] = false; // Set Byte if Below (CF=1)
SMPDefsFlags[NN_setbe] = false; // Set Byte if Below or Equal (CF=1 | ZF=1)
SMPDefsFlags[NN_setc] = false; // Set Byte if Carry (CF=1)
SMPDefsFlags[NN_sete] = false; // Set Byte if Equal (ZF=1)
SMPDefsFlags[NN_setg] = false; // Set Byte if Greater (ZF=0 & SF=OF)
SMPDefsFlags[NN_setge] = false; // Set Byte if Greater or Equal (SF=OF)
SMPDefsFlags[NN_setl] = false; // Set Byte if Less (SF!=OF)
SMPDefsFlags[NN_setle] = false; // Set Byte if Less or Equal (ZF=1 | SF!=OF)
SMPDefsFlags[NN_setna] = false; // Set Byte if Not Above (CF=1 | ZF=1)
SMPDefsFlags[NN_setnae] = false; // Set Byte if Not Above or Equal (CF=1)
SMPDefsFlags[NN_setnb] = false; // Set Byte if Not Below (CF=0)
SMPDefsFlags[NN_setnbe] = false; // Set Byte if Not Below or Equal (CF=0 & ZF=0)
SMPDefsFlags[NN_setnc] = false; // Set Byte if Not Carry (CF=0)
SMPDefsFlags[NN_setne] = false; // Set Byte if Not Equal (ZF=0)
SMPDefsFlags[NN_setng] = false; // Set Byte if Not Greater (ZF=1 | SF!=OF)
SMPDefsFlags[NN_setnge] = false; // Set Byte if Not Greater or Equal (SF!=OF)
SMPDefsFlags[NN_setnl] = false; // Set Byte if Not Less (SF=OF)
SMPDefsFlags[NN_setnle] = false; // Set Byte if Not Less or Equal (ZF=0 & SF=OF)
SMPDefsFlags[NN_setno] = false; // Set Byte if Not Overflow (OF=0)
SMPDefsFlags[NN_setnp] = false; // Set Byte if Not Parity (PF=0)
SMPDefsFlags[NN_setns] = false; // Set Byte if Not Sign (SF=0)
SMPDefsFlags[NN_setnz] = false; // Set Byte if Not Zero (ZF=0)
SMPDefsFlags[NN_seto] = false; // Set Byte if Overflow (OF=1)
SMPDefsFlags[NN_setp] = false; // Set Byte if Parity (PF=1)
SMPDefsFlags[NN_setpe] = false; // Set Byte if Parity Even (PF=1)
SMPDefsFlags[NN_setpo] = false; // Set Byte if Parity Odd (PF=0)
SMPDefsFlags[NN_sets] = false; // Set Byte if Sign (SF=1)
SMPDefsFlags[NN_setz] = false; // Set Byte if Zero (ZF=1)
SMPDefsFlags[NN_sgdt] = false; // Store Global Descriptor Table Register
SMPDefsFlags[NN_sidt] = false; // Store Interrupt Descriptor Table Register
SMPDefsFlags[NN_sldt] = false; // Store Local Descriptor Table Register
SMPDefsFlags[NN_str] = false; // Store Task Register
SMPDefsFlags[NN_wait] = false; // Wait until BUSY# Pin is Inactive (HIGH)
SMPDefsFlags[NN_xchg] = false; // Exchange Register/Memory with Register
SMPDefsFlags[NN_xlat] = false; // Table Lookup Translation
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
//
// 486 instructions
//
SMPDefsFlags[NN_bswap] = false; // Swap bytes in register
SMPDefsFlags[NN_invd] = false; // Invalidate Data Cache
SMPDefsFlags[NN_wbinvd] = false; // Invalidate Data Cache (write changes)
SMPDefsFlags[NN_invlpg] = false; // Invalidate TLB entry
//
// Pentium instructions
//
SMPDefsFlags[NN_rdmsr] = false; // Read Machine Status Register
SMPDefsFlags[NN_wrmsr] = false; // Write Machine Status Register
SMPDefsFlags[NN_cpuid] = false; // Get CPU ID
SMPDefsFlags[NN_rdtsc] = false; // Read Time Stamp Counter
//
// Pentium Pro instructions
//
SMPDefsFlags[NN_cmova] = false; // Move if Above (CF=0 & ZF=0)
SMPDefsFlags[NN_cmovb] = false; // Move if Below (CF=1)
SMPDefsFlags[NN_cmovbe] = false; // Move if Below or Equal (CF=1 | ZF=1)
SMPDefsFlags[NN_cmovg] = false; // Move if Greater (ZF=0 & SF=OF)
SMPDefsFlags[NN_cmovge] = false; // Move if Greater or Equal (SF=OF)
SMPDefsFlags[NN_cmovl] = false; // Move if Less (SF!=OF)
SMPDefsFlags[NN_cmovle] = false; // Move if Less or Equal (ZF=1 | SF!=OF)
SMPDefsFlags[NN_cmovnb] = false; // Move if Not Below (CF=0)
SMPDefsFlags[NN_cmovno] = false; // Move if Not Overflow (OF=0)
SMPDefsFlags[NN_cmovnp] = false; // Move if Not Parity (PF=0)
SMPDefsFlags[NN_cmovns] = false; // Move if Not Sign (SF=0)
SMPDefsFlags[NN_cmovnz] = false; // Move if Not Zero (ZF=0)
SMPDefsFlags[NN_cmovo] = false; // Move if Overflow (OF=1)
SMPDefsFlags[NN_cmovp] = false; // Move if Parity (PF=1)
SMPDefsFlags[NN_cmovs] = false; // Move if Sign (SF=1)
SMPDefsFlags[NN_cmovz] = false; // Move if Zero (ZF=1)
SMPDefsFlags[NN_fcmovb] = false; // Floating Move if Below
SMPDefsFlags[NN_fcmove] = false; // Floating Move if Equal
SMPDefsFlags[NN_fcmovbe] = false; // Floating Move if Below or Equal
SMPDefsFlags[NN_fcmovu] = false; // Floating Move if Unordered
SMPDefsFlags[NN_fcmovnb] = false; // Floating Move if Not Below
SMPDefsFlags[NN_fcmovne] = false; // Floating Move if Not Equal
SMPDefsFlags[NN_fcmovnbe] = false; // Floating Move if Not Below or Equal
SMPDefsFlags[NN_fcmovnu] = false; // Floating Move if Not Unordered
SMPDefsFlags[NN_rdpmc] = false; // Read Performance Monitor Counter
//
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
//
SMPDefsFlags[NN_fld] = false; // Load Real
SMPDefsFlags[NN_fst] = false; // Store Real
SMPDefsFlags[NN_fstp] = false; // Store Real and Pop
SMPDefsFlags[NN_fxch] = false; // Exchange Registers
SMPDefsFlags[NN_fild] = false; // Load Integer
SMPDefsFlags[NN_fist] = false; // Store Integer
SMPDefsFlags[NN_fistp] = false; // Store Integer and Pop
SMPDefsFlags[NN_fbld] = false; // Load BCD
SMPDefsFlags[NN_fbstp] = false; // Store BCD and Pop
SMPDefsFlags[NN_fadd] = false; // Add Real
SMPDefsFlags[NN_faddp] = false; // Add Real and Pop
SMPDefsFlags[NN_fiadd] = false; // Add Integer
SMPDefsFlags[NN_fsub] = false; // Subtract Real
SMPDefsFlags[NN_fsubp] = false; // Subtract Real and Pop
SMPDefsFlags[NN_fisub] = false; // Subtract Integer
SMPDefsFlags[NN_fsubr] = false; // Subtract Real Reversed
SMPDefsFlags[NN_fsubrp] = false; // Subtract Real Reversed and Pop
SMPDefsFlags[NN_fisubr] = false; // Subtract Integer Reversed
SMPDefsFlags[NN_fmul] = false; // Multiply Real
SMPDefsFlags[NN_fmulp] = false; // Multiply Real and Pop
SMPDefsFlags[NN_fimul] = false; // Multiply Integer
SMPDefsFlags[NN_fdiv] = false; // Divide Real
SMPDefsFlags[NN_fdivp] = false; // Divide Real and Pop
SMPDefsFlags[NN_fidiv] = false; // Divide Integer
SMPDefsFlags[NN_fdivr] = false; // Divide Real Reversed
SMPDefsFlags[NN_fdivrp] = false; // Divide Real Reversed and Pop
SMPDefsFlags[NN_fidivr] = false; // Divide Integer Reversed
SMPDefsFlags[NN_fsqrt] = false; // Square Root
SMPDefsFlags[NN_fscale] = false; // Scale: st(0) <- st(0) * 2^st(1)
SMPDefsFlags[NN_fprem] = false; // Partial Remainder
SMPDefsFlags[NN_frndint] = false; // Round to Integer
SMPDefsFlags[NN_fxtract] = false; // Extract exponent and significand
SMPDefsFlags[NN_fabs] = false; // Absolute value
SMPDefsFlags[NN_fchs] = false; // Change Sign
SMPDefsFlags[NN_ficom] = false; // Compare Integer
SMPDefsFlags[NN_ficomp] = false; // Compare Integer and Pop
SMPDefsFlags[NN_ftst] = false; // Test
SMPDefsFlags[NN_fxam] = false; // Examine
SMPDefsFlags[NN_fptan] = false; // Partial tangent
SMPDefsFlags[NN_fpatan] = false; // Partial arctangent
SMPDefsFlags[NN_f2xm1] = false; // 2^x - 1
SMPDefsFlags[NN_fyl2x] = false; // Y * lg2(X)
SMPDefsFlags[NN_fyl2xp1] = false; // Y * lg2(X+1)
SMPDefsFlags[NN_fldz] = false; // Load +0.0
SMPDefsFlags[NN_fld1] = false; // Load +1.0
SMPDefsFlags[NN_fldpi] = false; // Load PI=3.14...
SMPDefsFlags[NN_fldl2t] = false; // Load lg2(10)
SMPDefsFlags[NN_fldl2e] = false; // Load lg2(e)
SMPDefsFlags[NN_fldlg2] = false; // Load lg10(2)
SMPDefsFlags[NN_fldln2] = false; // Load ln(2)
SMPDefsFlags[NN_finit] = false; // Initialize Processor
SMPDefsFlags[NN_fninit] = false; // Initialize Processor (no wait)
SMPDefsFlags[NN_fsetpm] = false; // Set Protected Mode
SMPDefsFlags[NN_fldcw] = false; // Load Control Word
SMPDefsFlags[NN_fstcw] = false; // Store Control Word
SMPDefsFlags[NN_fnstcw] = false; // Store Control Word (no wait)
SMPDefsFlags[NN_fstsw] = false; // Store Status Word to memory or AX
SMPDefsFlags[NN_fnstsw] = false; // Store Status Word (no wait) to memory or AX
SMPDefsFlags[NN_fclex] = false; // Clear Exceptions
SMPDefsFlags[NN_fnclex] = false; // Clear Exceptions (no wait)
SMPDefsFlags[NN_fstenv] = false; // Store Environment
SMPDefsFlags[NN_fnstenv] = false; // Store Environment (no wait)
SMPDefsFlags[NN_fldenv] = false; // Load Environment
SMPDefsFlags[NN_fsave] = false; // Save State
SMPDefsFlags[NN_fnsave] = false; // Save State (no wait)
SMPDefsFlags[NN_frstor] = false; // Restore State
SMPDefsFlags[NN_fincstp] = false; // Increment Stack Pointer
SMPDefsFlags[NN_fdecstp] = false; // Decrement Stack Pointer
SMPDefsFlags[NN_ffree] = false; // Free Register
SMPDefsFlags[NN_fnop] = false; // No Operation
SMPDefsFlags[NN_feni] = false; // (8087 only)
SMPDefsFlags[NN_fneni] = false; // (no wait) (8087 only)
SMPDefsFlags[NN_fdisi] = false; // (8087 only)
SMPDefsFlags[NN_fndisi] = false; // (no wait) (8087 only)
//
// 80387 instructions
//
SMPDefsFlags[NN_fprem1] = false; // Partial Remainder ( < half )
SMPDefsFlags[NN_fsincos] = false; // t<-cos(st); st<-sin(st); push t
SMPDefsFlags[NN_fsin] = false; // Sine
SMPDefsFlags[NN_fcos] = false; // Cosine
SMPDefsFlags[NN_fucom] = false; // Compare Unordered Real
SMPDefsFlags[NN_fucomp] = false; // Compare Unordered Real and Pop
SMPDefsFlags[NN_fucompp] = false; // Compare Unordered Real and Pop Twice
//
// Instructions added 28.02.96
//
SMPDefsFlags[NN_svdc] = false; // Save Register and Descriptor
SMPDefsFlags[NN_rsdc] = false; // Restore Register and Descriptor
SMPDefsFlags[NN_svldt] = false; // Save LDTR and Descriptor
SMPDefsFlags[NN_rsldt] = false; // Restore LDTR and Descriptor
SMPDefsFlags[NN_svts] = false; // Save TR and Descriptor
SMPDefsFlags[NN_rsts] = false; // Restore TR and Descriptor
SMPDefsFlags[NN_icebp] = false; // ICE Break Point
//
// MMX instructions
//
SMPDefsFlags[NN_emms] = false; // Empty MMX state
SMPDefsFlags[NN_movd] = false; // Move 32 bits
SMPDefsFlags[NN_movq] = false; // Move 64 bits
SMPDefsFlags[NN_packsswb] = false; // Pack with Signed Saturation (Word->Byte)
SMPDefsFlags[NN_packssdw] = false; // Pack with Signed Saturation (Dword->Word)
SMPDefsFlags[NN_packuswb] = false; // Pack with Unsigned Saturation (Word->Byte)
SMPDefsFlags[NN_paddb] = false; // Packed Add Byte
SMPDefsFlags[NN_paddw] = false; // Packed Add Word
SMPDefsFlags[NN_paddd] = false; // Packed Add Dword
SMPDefsFlags[NN_paddsb] = false; // Packed Add with Saturation (Byte)
SMPDefsFlags[NN_paddsw] = false; // Packed Add with Saturation (Word)
SMPDefsFlags[NN_paddusb] = false; // Packed Add Unsigned with Saturation (Byte)