@@ -2360,3 +2360,158 @@ test_cases:
2360
2360
access : CS_AC_READ
2361
2361
regs_read : [ esp, eip, gs, rip]
2362
2362
regs_write : [ esp, eip ]
2363
+
2364
+ -
2365
+ input :
2366
+ name : " Interrupt instructions, 16-bit decode mode"
2367
+ bytes : [
2368
+ 0xcc, # int3
2369
+ 0xcd, 0x80, # int 0x80
2370
+ 0xce, # into
2371
+ 0xf1 # int1
2372
+ ]
2373
+ arch : " x86"
2374
+ options : [ CS_OPT_DETAIL, CS_MODE_16 ]
2375
+ address : 0x0
2376
+ expected :
2377
+ insns :
2378
+ -
2379
+ asm_text : " int3"
2380
+ details :
2381
+ x86 :
2382
+ prefix : [ X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0 ]
2383
+ opcode : [ 0xcc, 0x00, 0x00, 0x00 ]
2384
+ eflags : [ X86_EFLAGS_RESET_TF, X86_EFLAGS_MODIFY_IF, X86_EFLAGS_MODIFY_NT, X86_EFLAGS_RESET_RF ]
2385
+ regs_read : [ flags, esp ]
2386
+ regs_write : [ flags, eip, esp ]
2387
+ -
2388
+ asm_text : " int 0x80"
2389
+ details :
2390
+ x86 :
2391
+ prefix : [ X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0 ]
2392
+ opcode : [ 0xcd, 0x00, 0x00, 0x00 ]
2393
+ eflags : [ X86_EFLAGS_RESET_TF, X86_EFLAGS_MODIFY_IF, X86_EFLAGS_MODIFY_NT, X86_EFLAGS_RESET_RF ]
2394
+ operands :
2395
+ -
2396
+ type : X86_OP_IMM
2397
+ imm : 0x80
2398
+ size : 1
2399
+ regs_read : [ flags, esp ]
2400
+ regs_write : [ flags, eip, esp ]
2401
+ -
2402
+ asm_text : " into"
2403
+ details :
2404
+ x86 :
2405
+ prefix : [ X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0 ]
2406
+ opcode : [ 0xce, 0x00, 0x00, 0x00 ]
2407
+ eflags : [ X86_EFLAGS_MODIFY_TF, X86_EFLAGS_MODIFY_IF, X86_EFLAGS_MODIFY_NT, X86_EFLAGS_RESET_RF, X86_EFLAGS_TEST_OF ]
2408
+ regs_read : [ flags, esp ]
2409
+ regs_write : [ flags, eip, esp ]
2410
+ -
2411
+ asm_text : " int1"
2412
+ details :
2413
+ x86 :
2414
+ prefix : [ X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0 ]
2415
+ opcode : [ 0xf1, 0x00, 0x00, 0x00 ]
2416
+ regs_read : [ esp ]
2417
+ regs_write : [ eip, esp ]
2418
+
2419
+ -
2420
+ input :
2421
+ name : " Interrupt instructions, 32-bit decode mode"
2422
+ bytes : [
2423
+ 0xcc, # int3
2424
+ 0xcd, 0x80, # int 0x80
2425
+ 0xce, # into
2426
+ 0xf1 # int1
2427
+ ]
2428
+ arch : " x86"
2429
+ options : [ CS_OPT_DETAIL, CS_MODE_32 ]
2430
+ address : 0x0
2431
+ expected :
2432
+ insns :
2433
+ -
2434
+ asm_text : " int3"
2435
+ details :
2436
+ x86 :
2437
+ prefix : [ X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0 ]
2438
+ opcode : [ 0xcc, 0x00, 0x00, 0x00 ]
2439
+ eflags : [ X86_EFLAGS_RESET_TF, X86_EFLAGS_MODIFY_IF, X86_EFLAGS_MODIFY_NT, X86_EFLAGS_RESET_RF ]
2440
+ regs_read : [ eflags, esp ]
2441
+ regs_write : [ eflags, eip, esp ]
2442
+ -
2443
+ asm_text : " int 0x80"
2444
+ details :
2445
+ x86 :
2446
+ prefix : [ X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0 ]
2447
+ opcode : [ 0xcd, 0x00, 0x00, 0x00 ]
2448
+ eflags : [ X86_EFLAGS_RESET_TF, X86_EFLAGS_MODIFY_IF, X86_EFLAGS_MODIFY_NT, X86_EFLAGS_RESET_RF ]
2449
+ operands :
2450
+ -
2451
+ type : X86_OP_IMM
2452
+ imm : 0x80
2453
+ size : 1
2454
+ regs_read : [ eflags, esp ]
2455
+ regs_write : [ eflags, eip, esp ]
2456
+ -
2457
+ asm_text : " into"
2458
+ details :
2459
+ x86 :
2460
+ prefix : [ X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0 ]
2461
+ opcode : [ 0xce, 0x00, 0x00, 0x00 ]
2462
+ eflags : [ X86_EFLAGS_MODIFY_TF, X86_EFLAGS_MODIFY_IF, X86_EFLAGS_MODIFY_NT, X86_EFLAGS_RESET_RF, X86_EFLAGS_TEST_OF ]
2463
+ regs_read : [ eflags, esp ]
2464
+ regs_write : [ eflags, eip, esp ]
2465
+ -
2466
+ asm_text : " int1"
2467
+ details :
2468
+ x86 :
2469
+ prefix : [ X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0 ]
2470
+ opcode : [ 0xf1, 0x00, 0x00, 0x00 ]
2471
+ regs_read : [ esp ]
2472
+ regs_write : [ eip, esp ]
2473
+
2474
+ -
2475
+ input :
2476
+ name : " Interrupt instructions, 64-bit decode mode"
2477
+ bytes : [
2478
+ 0xcc, # int3
2479
+ 0xcd, 0x80, # int 0x80
2480
+ 0xf1 # int1
2481
+ ]
2482
+ arch : " x86"
2483
+ options : [ CS_OPT_DETAIL, CS_MODE_64 ]
2484
+ address : 0x0
2485
+ expected :
2486
+ insns :
2487
+ -
2488
+ asm_text : " int3"
2489
+ details :
2490
+ x86 :
2491
+ prefix : [ X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0 ]
2492
+ opcode : [ 0xcc, 0x00, 0x00, 0x00 ]
2493
+ eflags : [ X86_EFLAGS_RESET_TF, X86_EFLAGS_MODIFY_IF, X86_EFLAGS_MODIFY_NT, X86_EFLAGS_RESET_RF ]
2494
+ regs_read : [ rflags, esp ]
2495
+ regs_write : [ rflags, eip, esp ]
2496
+ -
2497
+ asm_text : " int 0x80"
2498
+ details :
2499
+ x86 :
2500
+ prefix : [ X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0 ]
2501
+ opcode : [ 0xcd, 0x00, 0x00, 0x00 ]
2502
+ eflags : [ X86_EFLAGS_RESET_TF, X86_EFLAGS_MODIFY_IF, X86_EFLAGS_MODIFY_NT, X86_EFLAGS_RESET_RF ]
2503
+ operands :
2504
+ -
2505
+ type : X86_OP_IMM
2506
+ imm : 0x80
2507
+ size : 1
2508
+ regs_read : [ rflags, esp ]
2509
+ regs_write : [ rflags, eip, esp ]
2510
+ -
2511
+ asm_text : " int1"
2512
+ details :
2513
+ x86 :
2514
+ prefix : [ X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0, X86_PREFIX_0 ]
2515
+ opcode : [ 0xf1, 0x00, 0x00, 0x00 ]
2516
+ regs_read : [ esp ]
2517
+ regs_write : [ eip, esp ]
0 commit comments