@@ -48,12 +48,9 @@ bool Disassembler::_library_usable = false;
48
48
49
49
// This routine is in the shared library:
50
50
Disassembler::decode_func_virtual Disassembler::_decode_instructions_virtual = NULL ;
51
- Disassembler::decode_func Disassembler::_decode_instructions = NULL ;
52
51
53
52
static const char hsdis_library_name[] = " hsdis-" HOTSPOT_LIB_ARCH;
54
53
static const char decode_instructions_virtual_name[] = " decode_instructions_virtual" ;
55
- static const char decode_instructions_name[] = " decode_instructions" ;
56
- static bool use_new_version = true ;
57
54
#define COMMENT_COLUMN 52 LP64_ONLY (+8 ) /* could be an option*/
58
55
#define BYTES_COMMENT " ;..." /* funky byte display comment */
59
56
@@ -736,34 +733,22 @@ address decode_env::decode_instructions(address start, address end, address orig
736
733
// This is mainly for debugging the library itself.
737
734
FILE* out = stdout;
738
735
FILE* xmlout = (_print_raw > 1 ? out : NULL );
739
- return use_new_version ?
736
+ return
740
737
(address)
741
738
(*Disassembler::_decode_instructions_virtual)((uintptr_t )start, (uintptr_t )end,
742
739
start, end - start,
743
740
NULL , (void *) xmlout,
744
741
NULL , (void *) out,
745
- options (), 0 /* nice new line*/ )
746
- :
747
- (address)
748
- (*Disassembler::_decode_instructions)(start, end,
749
- NULL , (void *) xmlout,
750
- NULL , (void *) out,
751
- options ());
742
+ options (), 0 /* nice new line*/ );
752
743
}
753
744
754
- return use_new_version ?
745
+ return
755
746
(address)
756
747
(*Disassembler::_decode_instructions_virtual)((uintptr_t )start, (uintptr_t )end,
757
748
start, end - start,
758
749
&event_to_env, (void *) this ,
759
750
&printf_to_env, (void *) this ,
760
- options (), 0 /* nice new line*/ )
761
- :
762
- (address)
763
- (*Disassembler::_decode_instructions)(start, end,
764
- &event_to_env, (void *) this ,
765
- &printf_to_env, (void *) this ,
766
- options ());
751
+ options (), 0 /* nice new line*/ );
767
752
}
768
753
769
754
// ----------------------------------------------------------------------------
@@ -853,21 +838,13 @@ bool Disassembler::load_library(outputStream* st) {
853
838
_library = os::dll_load (buf, ebuf, sizeof ebuf);
854
839
}
855
840
856
- // load the decoder function to use (new or old version) .
841
+ // load the decoder function to use.
857
842
if (_library != NULL ) {
858
843
_decode_instructions_virtual = CAST_TO_FN_PTR (Disassembler::decode_func_virtual,
859
844
os::dll_lookup (_library, decode_instructions_virtual_name));
860
845
}
861
- if (_decode_instructions_virtual == NULL && _library != NULL ) {
862
- // could not spot in new version, try old version
863
- _decode_instructions = CAST_TO_FN_PTR (Disassembler::decode_func,
864
- os::dll_lookup (_library, decode_instructions_name));
865
- use_new_version = false ;
866
- } else {
867
- use_new_version = true ;
868
- }
869
846
_tried_to_load_library = true ;
870
- _library_usable = _decode_instructions_virtual != NULL || _decode_instructions != NULL ;
847
+ _library_usable = _decode_instructions_virtual != NULL ;
871
848
872
849
// Create a dummy environment to initialize PrintAssemblyOptions.
873
850
// The PrintAssemblyOptions must be known for abstract disassemblies as well.
0 commit comments