Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/trusted/validator_arm/armv7.table

Issue 10459058: Define a baseline and testing patterns for ARM load_store_word_byte table. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # ARMv7 Instruction Encodings 1 # ARMv7 Instruction Encodings
2 # 2 #
3 # This table is derived from the "ARM Architecture Reference Manual, ARMv7-A 3 # This table is derived from the "ARM Architecture Reference Manual, ARMv7-A
4 # and ARMv7-R edition" and is used here with the permission of ARM Limited. 4 # and ARMv7-R edition" and is used here with the permission of ARM Limited.
5 # Reproduction for purposes other than the development and distribution of 5 # Reproduction for purposes other than the development and distribution of
6 # Native Client may require the explicit permission of ARM Limited. 6 # Native Client may require the explicit permission of ARM Limited.
7 7
8 # This file defines the Native Client "instruction classes" assigned to every 8 # This file defines the Native Client "instruction classes" assigned to every
9 # possible ARMv7 instruction encoding. It is organized into a series of tables, 9 # possible ARMv7 instruction encoding. It is organized into a series of tables,
10 # and directly parallels the ARM Architecture Reference Manual cited above. 10 # and directly parallels the ARM Architecture Reference Manual cited above.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 # The following defines a class decoder hierarchy used to select the 92 # The following defines a class decoder hierarchy used to select the
93 # appropriate tester. We want to add class hierarchy information for 93 # appropriate tester. We want to add class hierarchy information for
94 # classes that want their tester to be defined on a superclass. 94 # classes that want their tester to be defined on a superclass.
95 # By providing this information, the generator can pick out 95 # By providing this information, the generator can pick out
96 # the corresponding baseline class tester to use, and does 96 # the corresponding baseline class tester to use, and does
97 # not need to define separate testers for derived classes of 97 # not need to define separate testers for derived classes of
98 # the baseline class tester. 98 # the baseline class tester.
99 # ############################################################# 99 # #############################################################
100 100
101 class ForbiddenCondNop : UnsafeCondNop 101 class ForbiddenCondNop : UnsafeCondNop
102 class Load2RegisterImmediateDoubleOp : LoadStore2RegisterImmediateDoubleOp
103 class Load2RegisterImmediateOp : LoadStore2RegisterImmediateOp
104 class Load3RegisterDoubleOp : LoadStore3RegisterDoubleOp 102 class Load3RegisterDoubleOp : LoadStore3RegisterDoubleOp
103 class Load2RegisterImm8DoubleOp : LoadStore2RegisterImm8DoubleOp
104 class Load2RegisterImm8Op : LoadStore2RegisterImm8Op
105 class Load2RegisterImm12Op : LoadStore2RegisterImm12Op
106 class Load3RegisterImm5Op : LoadStore3RegisterImm5Op
105 class Load3RegisterOp : LoadStore3RegisterOp 107 class Load3RegisterOp : LoadStore3RegisterOp
106 class MaskedBinary2RegisterImmediateOp : Binary2RegisterImmediateOp 108 class MaskedBinary2RegisterImmediateOp : Binary2RegisterImmediateOp
107 class MaskedBinaryRegisterImmediateTest : BinaryRegisterImmediateTest 109 class MaskedBinaryRegisterImmediateTest : BinaryRegisterImmediateTest
108 class Store2RegisterImmediateDoubleOp : LoadStore2RegisterImmediateDoubleOp
109 class Store2RegisterImmediateOp : LoadStore2RegisterImmediateOp
110 class Store3RegisterDoubleOp : LoadStore3RegisterDoubleOp 110 class Store3RegisterDoubleOp : LoadStore3RegisterDoubleOp
111 class Store2RegisterImm8DoubleOp : LoadStore2RegisterImm8DoubleOp
112 class Store2RegisterImm8Op : LoadStore2RegisterImm8Op
113 class Store2RegisterImm12Op : LoadStore2RegisterImm12Op
114 class Store3RegisterImm5Op : LoadStore3RegisterImm5Op
111 class Store3RegisterOp : LoadStore3RegisterOp 115 class Store3RegisterOp : LoadStore3RegisterOp
112 116
113 ############################################################## 117 ##############################################################
114 # The following define decoder tables. 118 # The following define decoder tables.
115 ############################################################## 119 ##############################################################
116 120
117 +-- ARMv7 (See Section A5.1) 121 +-- ARMv7 (See Section A5.1)
118 | cond(31:28) op1(27:25) op(4) 122 | cond(31:28) op1(27:25) op(4)
119 | ~1111 00x - ->dp_misc 123 | ~1111 00x - ->dp_misc
120 | " 010 - ->load_store_word_byte 124 | " 010 - ->load_store_word_byte
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 +-- 451 +--
448 452
449 +-- extra_load_store (See Section A5.2.8) 453 +-- extra_load_store (See Section A5.2.8)
450 | op2(6:5) op1(24:20) Rn(19:16) 454 | op2(6:5) op1(24:20) Rn(19:16)
451 | 01 xx0x0 - = Store3RegisterOp => StrRegister 455 | 01 xx0x0 - = Store3RegisterOp => StrRegister
452 Strh_Rule_208_A1_P412 456 Strh_Rule_208_A1_P412
453 cccc000pd0w0nnnntttt00001011mmmm 457 cccc000pd0w0nnnntttt00001011mmmm
454 | " xx0x1 - = Load3RegisterOp => LdrRegister 458 | " xx0x1 - = Load3RegisterOp => LdrRegister
455 Ldrh_Rule_76_A1_P156 459 Ldrh_Rule_76_A1_P156
456 cccc000pd0w1nnnntttt00001011mmmm 460 cccc000pd0w1nnnntttt00001011mmmm
457 | " xx1x0 - = Store2RegisterImmediateOp => StrImmediate 461 | " xx1x0 - = Store2RegisterImm8Op => StrImmediate
458 Strh_Rule_207_A1_P410 462 Strh_Rule_207_A1_P410
459 cccc000pd1w0nnnnttttiiii1011iiii 463 cccc000pd1w0nnnnttttiiii1011iiii
460 | " xx1x1 ~1111 = Load2RegisterImmediateOp => LdrImmediate 464 | " xx1x1 ~1111 = Load2RegisterImm8Op => LdrImmediate
461 Ldrh_Rule_74_A1_P152 465 Ldrh_Rule_74_A1_P152
462 cccc000pd1w1nnnnttttiiii1011iiii NotRnIsPc 466 cccc000pd1w1nnnnttttiiii1011iiii NotRnIsPc
463 | " " 1111 = Load2RegisterImmediateOp => LdrImmediate 467 | " " 1111 = Load2RegisterImm8Op => LdrImmediate
464 Ldrh_Rule_75_A1_P154 468 Ldrh_Rule_75_A1_P154
465 cccc0001d1011111ttttiiii1011iiii 469 cccc0001d1011111ttttiiii1011iiii
466 | 10 xx0x0 - = Load3RegisterDoubleOp => LdrRegisterDouble 470 | 10 xx0x0 - = Load3RegisterDoubleOp => LdrRegisterDouble
467 Ldrd_Rule_68_A1_P140 471 Ldrd_Rule_68_A1_P140
468 cccc000pd0w0nnnntttt00001101mmmm (v5TE) 472 cccc000pd0w0nnnntttt00001101mmmm (v5TE)
469 | " xx0x1 - = Load3RegisterOp => LdrRegister 473 | " xx0x1 - = Load3RegisterOp => LdrRegister
470 Ldrsb_Rule_80_A1_P164 474 Ldrsb_Rule_80_A1_P164
471 cccc000pd0w1nnnntttt00001101mmmm 475 cccc000pd0w1nnnntttt00001101mmmm
472 | " xx1x0 ~1111 = Load2RegisterImmediateDoubleOp 476 | " xx1x0 ~1111 = Load2RegisterImm8DoubleOp
473 => LdrImmediateDouble 477 => LdrImmediateDouble
474 Ldrd_Rule_66_A1_P136 478 Ldrd_Rule_66_A1_P136
475 cccc000pd1w0nnnnttttiiii1101iiii NotRnIsPc (v5 TE) 479 cccc000pd1w0nnnnttttiiii1101iiii NotRnIsPc (v5 TE)
476 | " " 1111 = Load2RegisterImmediateDoubleOp 480 | " " 1111 = Load2RegisterImm8DoubleOp
477 => LdrImmediateDouble 481 => LdrImmediateDouble
478 Ldrd_Rule_67_A1_P138 482 Ldrd_Rule_67_A1_P138
479 cccc0001d1001111ttttiiii1101iiii (v5TE) 483 cccc0001d1001111ttttiiii1101iiii (v5TE)
480 | " xx1x1 ~1111 = Load2RegisterImmediateOp => LdrImmediate 484 | " xx1x1 ~1111 = Load2RegisterImm8Op => LdrImmediate
481 Ldrsb_Rule_78_A1_P160 485 Ldrsb_Rule_78_A1_P160
482 cccc000pd1w1nnnnttttiiii1101iiii NotRnIsPc 486 cccc000pd1w1nnnnttttiiii1101iiii NotRnIsPc
483 | " " 1111 = Load2RegisterImmediateOp => LdrImmediate 487 | " " 1111 = Load2RegisterImm8Op => LdrImmediate
484 ldrsb_Rule_79_A1_162 488 ldrsb_Rule_79_A1_162
485 cccc0001d1011111ttttiiii1101iiii 489 cccc0001d1011111ttttiiii1101iiii
486 | 11 xx0x0 - = Store3RegisterDoubleOp => StrRegisterDouble 490 | 11 xx0x0 - = Store3RegisterDoubleOp => StrRegisterDouble
487 Strd_Rule_201_A1_P398 491 Strd_Rule_201_A1_P398
488 cccc000pd0w0nnnntttt00001111mmmm 492 cccc000pd0w0nnnntttt00001111mmmm
489 | " xx0x1 - = Load3RegisterOp => LdrRegister 493 | " xx0x1 - = Load3RegisterOp => LdrRegister
490 Ldrsh_Rule_84_A1_P172 494 Ldrsh_Rule_84_A1_P172
491 cccc000pd0w1nnnntttt00001111mmmm 495 cccc000pd0w1nnnntttt00001111mmmm
492 | " xx1x0 - = Store2RegisterImmediateDoubleOp 496 | " xx1x0 - = Store2RegisterImm8DoubleOp
493 => StrImmediateDouble 497 => StrImmediateDouble
494 Strd_Rule_200_A1_P396 498 Strd_Rule_200_A1_P396
495 cccc000pd1w0nnnnttttiiii1111iiii 499 cccc000pd1w0nnnnttttiiii1111iiii
496 | " xx1x1 ~1111 = Load2RegisterImmediateOp => LdrImmediate 500 | " xx1x1 ~1111 = Load2RegisterImm8Op => LdrImmediate
497 Ldrsh_Rule_82_A1_P168 501 Ldrsh_Rule_82_A1_P168
498 cccc000pd1w1nnnnttttiiii1111iiii NotRnIsPc 502 cccc000pd1w1nnnnttttiiii1111iiii NotRnIsPc
499 | " " 1111 = Load2RegisterImmediateOp => LdrImmediate 503 | " " 1111 = Load2RegisterImm8Op => LdrImmediate
500 Ldrsh_Rule_83_A1_P170 504 Ldrsh_Rule_83_A1_P170
501 cccc0001d1011111ttttiiii1111iiii 505 cccc0001d1011111ttttiiii1111iiii
502 +-- 506 +--
503 507
504 # Unprivileged load-store table omitted: modeled as Forbidden. 508 # Unprivileged load-store table omitted: modeled as Forbidden.
505 # They are not expected in user code. 509 # They are not expected in user code.
506 510
507 +-- sync (See Section A5.2.10) 511 +-- sync (See Section A5.2.10)
508 | op(23:20) 512 | op(23:20)
509 | 0x00 =Deprecated # SWP, SWPB TODO(cbiffle): model these? 513 | 0x00 =Deprecated # SWP, SWPB TODO(cbiffle): model these?
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 | 011 01 - =BxBlx(v5T) # BLX(register) 583 | 011 01 - =BxBlx(v5T) # BLX(register)
580 | 101 - - ->sat_add_sub 584 | 101 - - ->sat_add_sub
581 | 111 01 - =Breakpoint(v5T) # BKPT 585 | 111 01 - =Breakpoint(v5T) # BKPT
582 | 111 11 - =Forbidden # SMC 586 | 111 11 - =Forbidden # SMC
583 | else: =Undefined # Note on page A5-18 587 | else: =Undefined # Note on page A5-18
584 +-- 588 +--
585 589
586 +-- load_store_word_byte (See Section A5.3) 590 +-- load_store_word_byte (See Section A5.3)
587 | A(25) op1(24:20) B(4) Rn(19:16) 591 | A(25) op1(24:20) B(4) Rn(19:16)
588 # Following 2 rows implement op1 = xx0x0 & ~0x010 592 # Following 2 rows implement op1 = xx0x0 & ~0x010
589 | 0 1x0x0 - - =StoreImmediate # STR(immediate) A8-384 593 | 0 1x0x0 - - = Store2RegisterImm12Op => StrImmediate
594 Str_Rule_194_A1_P384
595 cccc010pd0w0nnnnttttiiiiiiiiiiii
590 | " 0x000 " " " 596 | " 0x000 " " "
591 # Following 2 rows implement op1 = xx0x0 & ~0x010 597 # Following 2 rows implement op1 = xx0x0 & ~0x010
592 | 1 1x0x0 0 - =StoreRegister # STR(register) A8-386 598 | 1 1x0x0 0 - = Store3RegisterImm5Op => StrRegister
599 Str_Rule_195_A1_P386
600 cccc011pd0w0nnnnttttiiiiitt0mmmm
593 | " 0x000 " " " 601 | " 0x000 " " "
594 | 0 0x010 - - =Forbidden # STRT A8-416 602 # STRT (rule 210, A1 and A2, page 416) define unprivledge stores, which
603 # NaCl doesn't allow.
604 | 0 0x010 - - = Forbidden
595 | 1 0x010 0 - " 605 | 1 0x010 0 - "
596 # Following 2 rows implement op1 = xx0x1 & ~0x011 606 # Following 2 rows implement op1 = xx0x1 & ~0x011
597 | 0 1x0x1 - ~1111 =LoadImmediate # LDR(immediate) A8-120 607 | 0 1x0x1 - ~1111 = Load2RegisterImm12Op => LdrImmediate
608 Ldr_Rule_58_A1_P120
609 cccc010pd0w1nnnnttttiiiiiiiiiiii NotRnIsPc
598 | " 0x001 " " " 610 | " 0x001 " " "
599 # Following 2 rows implement op1 = xx0x1 & ~0x011 611 # Following 2 rows implement op1 = xx0x1 & ~0x011
600 | " 1x0x1 " 1111 =LoadImmediate # LDR(literal) A8-122 612 | " 1x0x1 " 1111 = Load2RegisterImm12Op => LdrImmediate
613 Ldr_Rule_59_A1_P122
614 cccc0101d0011111ttttiiiiiiiiiiii
601 | " 0x001 " " " 615 | " 0x001 " " "
602 # Following 2 rows implement op1 = xx0x1 & ~0x011 616 # Following 2 rows implement op1 = xx0x1 & ~0x011
603 | 1 1x0x1 0 - =LoadRegister # LDR(register) A8-124 617 | 1 1x0x1 0 - = Load3RegisterImm5Op => LdrRegister
618 Ldr_Rule_60_A1_P124
619 cccc011pd0w1nnnnttttiiiiitt0mmmm
604 | " xx001 " " " 620 | " xx001 " " "
605 | 0 0x011 - - =Forbidden # LDRT A8-176 621 # LDRT (rule 86, A1 and A2, page 176) define unprivledge loads, which
622 # NaCl doesn't allow.
623 | 0 0x011 - - = Forbidden
606 | 1 0x011 0 - " 624 | 1 0x011 0 - "
607 # Following 2 rows implement op1 = xx1x0 & ~0x110 625 # Following 2 rows implement op1 = xx1x0 & ~0x110
608 | 0 1x1x0 - - =StoreImmediate # STRB(immediate) A8-390 626 | 0 1x1x0 - - = Store2RegisterImm12Op => StrImmediate
627 Strb_Rule_197_A1_P390
628 cccc010pd1w0nnnnttttiiiiiiiiiiii
609 | " 0x100 " " " 629 | " 0x100 " " "
610 # Following 2 rows implement op1 = xx1x0 & ~0x110 630 # Following 2 rows implement op1 = xx1x0 & ~0x110
611 | 1 1x1x0 0 - =StoreRegister # STRB(register) A8-392 631 | 1 1x1x0 0 - = Store3RegisterImm5Op => StrRegister
632 Strb_Rule_198_A1_P392
633 cccc011pd1w0nnnnttttiiiiitt0mmmm
612 | " 0x100 " " " 634 | " 0x100 " " "
613 | 0 0x110 - - =Forbidden # STRBT A8-394 635 # Strbt (rule 199, A1 and A2, page 394) define unprivledged stores, which
636 # NaCl doesn't allow.
637 | 0 0x110 - - = Forbidden # STRBT A8-394
614 | 1 0x110 0 - " 638 | 1 0x110 0 - "
615 # Following 2 rows implement op1 = xx1x1 & ~0x111 639 # Following 2 rows implement op1 = xx1x1 & ~0x111
616 | 0 1x1x1 - ~1111 =LoadImmediate # LDRB(immediate) A8-128 640 | 0 1x1x1 - ~1111 = Load2RegisterImm12Op => LdrImmediate
641 Ldrb_Rule_62_A1_P128
642 cccc010pd1w1nnnnttttiiiiiiiiiiii NotRnIsPc
617 | " 0x101 " " " 643 | " 0x101 " " "
618 # Following 2 rows implement op1 = xx1x1 & ~0x111 644 # Following 2 rows implement op1 = xx1x1 & ~0x111
619 | " 1x1x1 " 1111 =LoadImmediate # LDRB(literal) A8-130 645 | " 1x1x1 " 1111 = Load2RegisterImm12Op => LdrImmediate
646 Ldrb_Rule_63_A1_P130
647 cccc0101d1011111ttttiiiiiiiiiiii
620 | " 0x101 " " " 648 | " 0x101 " " "
621 # Following 2 rows implement op1 = xx1x1 & ~0x111 649 # Following 2 rows implement op1 = xx1x1 & ~0x111
622 | 1 1x1x1 0 - =LoadRegister # LDRB(register) A8-132 650 | 1 1x1x1 0 - = Load3RegisterImm5Op => LdrRegister
651 Ldrb_Rule_64_A1_P132
652 cccc011pd1w1nnnnttttiiiiitt0mmmm
623 | " 0x101 " " " 653 | " 0x101 " " "
624 | 0 0x111 - - =Forbidden # LDRBT A8-132 654 # Ldrbt (rule 65, A1 and A2, page 134) define unprivledged loads, which
655 # NaCl doesn't allow.
656 | 0 0x111 - - = Forbidden
625 | 1 0x111 0 - " 657 | 1 0x111 0 - "
626 +-- 658 +--
627 659
628 +-- media (See Section A5.4) 660 +-- media (See Section A5.4)
629 | op1(24:20) op2(7:5) Rd(15:12) Rn(3:0) 661 | op1(24:20) op2(7:5) Rd(15:12) Rn(3:0)
630 | 000xx - - - ->parallel_add_sub # signed 662 | 000xx - - - ->parallel_add_sub # signed
631 | 001xx - - - ->parallel_add_sub # unsigned 663 | 001xx - - - ->parallel_add_sub # unsigned
632 | 01xxx - - - ->pack_sat_rev 664 | 01xxx - - - ->pack_sat_rev
633 | 10xxx - - - ->signed_mult 665 | 10xxx - - - ->signed_mult
634 | 11000 000 1111 - =Multiply(v6) # USAD8 666 | 11000 000 1111 - =Multiply(v6) # USAD8
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 | " 1001 " 1040 | " 1001 "
1009 | " 1101 =VectorLoad # VLD2(single, all lanes) 1041 | " 1101 =VectorLoad # VLD2(single, all lanes)
1010 | " 0x10 =VectorLoad # VLD3(single) 1042 | " 0x10 =VectorLoad # VLD3(single)
1011 | " 1010 " 1043 | " 1010 "
1012 | " 1110 =VectorLoad # VLD3(single, all lanes) 1044 | " 1110 =VectorLoad # VLD3(single, all lanes)
1013 | " 0x11 =VectorLoad # VLD4(single) 1045 | " 0x11 =VectorLoad # VLD4(single)
1014 | " 1011 " 1046 | " 1011 "
1015 | " 1111 =VectorLoad # VLD4(single, all lanes) 1047 | " 1111 =VectorLoad # VLD4(single, all lanes)
1016 | else: =Undefined # Note on page A7-27 1048 | else: =Undefined # Note on page A7-27
1017 +-- 1049 +--
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698