src/cpu/zero/vm/nativeInst_zero.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8022956 Sdiff src/cpu/zero/vm

src/cpu/zero/vm/nativeInst_zero.hpp

Print this page




  34 
  35 // We have interfaces for the following instructions:
  36 // - NativeInstruction
  37 // - - NativeCall
  38 // - - NativeMovConstReg
  39 // - - NativeMovConstRegPatching
  40 // - - NativeJump
  41 // - - NativeIllegalOpCode
  42 // - - NativeReturn
  43 // - - NativeReturnX (return with argument)
  44 // - - NativePushConst
  45 // - - NativeTstRegMem
  46 
  47 // The base class for different kinds of native instruction abstractions.
  48 // Provides the primitive operations to manipulate code relative to this.
  49 
  50 class NativeInstruction VALUE_OBJ_CLASS_SPEC {
  51  public:
  52   bool is_jump() {
  53     ShouldNotCallThis();

  54   }
  55 
  56   bool is_safepoint_poll() {
  57     ShouldNotCallThis();

  58   }
  59 };
  60 
  61 inline NativeInstruction* nativeInstruction_at(address address) {
  62   ShouldNotCallThis();

  63 }
  64 
  65 class NativeCall : public NativeInstruction {
  66  public:
  67   enum zero_specific_constants {
  68     instruction_size = 0 // not used within the interpreter
  69   };
  70 
  71   address instruction_address() const {
  72     ShouldNotCallThis();

  73   }
  74 
  75   address next_instruction_address() const {
  76     ShouldNotCallThis();

  77   }
  78 
  79   address return_address() const {
  80     ShouldNotCallThis();

  81   }
  82 
  83   address destination() const {
  84     ShouldNotCallThis();

  85   }
  86 
  87   void set_destination_mt_safe(address dest) {
  88     ShouldNotCallThis();
  89   }
  90 
  91   void verify_alignment() {
  92     ShouldNotCallThis();
  93   }
  94 
  95   void verify() {
  96     ShouldNotCallThis();
  97   }
  98 
  99   static bool is_call_before(address return_address) {
 100     ShouldNotCallThis();

 101   }
 102 };
 103 
 104 inline NativeCall* nativeCall_before(address return_address) {
 105   ShouldNotCallThis();

 106 }
 107 
 108 inline NativeCall* nativeCall_at(address address) {
 109   ShouldNotCallThis();

 110 }
 111 
 112 class NativeMovConstReg : public NativeInstruction {
 113  public:
 114   address next_instruction_address() const {
 115     ShouldNotCallThis();

 116   }
 117 
 118   intptr_t data() const {
 119     ShouldNotCallThis();

 120   }
 121 
 122   void set_data(intptr_t x) {
 123     ShouldNotCallThis();
 124   }
 125 };
 126 
 127 inline NativeMovConstReg* nativeMovConstReg_at(address address) {
 128   ShouldNotCallThis();

 129 }
 130 
 131 class NativeMovRegMem : public NativeInstruction {
 132  public:
 133   int offset() const {
 134     ShouldNotCallThis();

 135   }
 136 
 137   void set_offset(intptr_t x) {
 138     ShouldNotCallThis();
 139   }
 140 
 141   void add_offset_in_bytes(int add_offset) {
 142     ShouldNotCallThis();
 143   }
 144 };
 145 
 146 inline NativeMovRegMem* nativeMovRegMem_at(address address) {
 147   ShouldNotCallThis();

 148 }
 149 
 150 class NativeJump : public NativeInstruction {
 151  public:
 152   enum zero_specific_constants {
 153     instruction_size = 0 // not used within the interpreter
 154   };
 155 
 156   address jump_destination() const {
 157     ShouldNotCallThis();

 158   }
 159 
 160   void set_jump_destination(address dest) {
 161     ShouldNotCallThis();
 162   }
 163 
 164   static void check_verified_entry_alignment(address entry,
 165                                              address verified_entry) {
 166   }
 167 
 168   static void patch_verified_entry(address entry,
 169                                    address verified_entry,
 170                                    address dest);
 171 };
 172 
 173 inline NativeJump* nativeJump_at(address address) {
 174   ShouldNotCallThis();

 175 }
 176 
 177 class NativeGeneralJump : public NativeInstruction {
 178  public:
 179   address jump_destination() const {
 180     ShouldNotCallThis();

 181   }
 182 
 183   static void insert_unconditional(address code_pos, address entry) {
 184     ShouldNotCallThis();
 185   }
 186 
 187   static void replace_mt_safe(address instr_addr, address code_buffer) {
 188     ShouldNotCallThis();
 189   }
 190 };
 191 
 192 inline NativeGeneralJump* nativeGeneralJump_at(address address) {
 193   ShouldNotCallThis();

 194 }
 195 
 196 #endif // CPU_ZERO_VM_NATIVEINST_ZERO_HPP


  34 
  35 // We have interfaces for the following instructions:
  36 // - NativeInstruction
  37 // - - NativeCall
  38 // - - NativeMovConstReg
  39 // - - NativeMovConstRegPatching
  40 // - - NativeJump
  41 // - - NativeIllegalOpCode
  42 // - - NativeReturn
  43 // - - NativeReturnX (return with argument)
  44 // - - NativePushConst
  45 // - - NativeTstRegMem
  46 
  47 // The base class for different kinds of native instruction abstractions.
  48 // Provides the primitive operations to manipulate code relative to this.
  49 
  50 class NativeInstruction VALUE_OBJ_CLASS_SPEC {
  51  public:
  52   bool is_jump() {
  53     ShouldNotCallThis();
  54     return false;
  55   }
  56 
  57   bool is_safepoint_poll() {
  58     ShouldNotCallThis();
  59     return false;
  60   }
  61 };
  62 
  63 inline NativeInstruction* nativeInstruction_at(address address) {
  64   ShouldNotCallThis();
  65   return NULL;
  66 }
  67 
  68 class NativeCall : public NativeInstruction {
  69  public:
  70   enum zero_specific_constants {
  71     instruction_size = 0 // not used within the interpreter
  72   };
  73 
  74   address instruction_address() const {
  75     ShouldNotCallThis();
  76     return NULL;
  77   }
  78 
  79   address next_instruction_address() const {
  80     ShouldNotCallThis();
  81     return NULL;
  82   }
  83 
  84   address return_address() const {
  85     ShouldNotCallThis();
  86     return NULL;
  87   }
  88 
  89   address destination() const {
  90     ShouldNotCallThis();
  91     return NULL;
  92   }
  93 
  94   void set_destination_mt_safe(address dest) {
  95     ShouldNotCallThis();
  96   }
  97 
  98   void verify_alignment() {
  99     ShouldNotCallThis();
 100   }
 101 
 102   void verify() {
 103     ShouldNotCallThis();
 104   }
 105 
 106   static bool is_call_before(address return_address) {
 107     ShouldNotCallThis();
 108     return false;
 109   }
 110 };
 111 
 112 inline NativeCall* nativeCall_before(address return_address) {
 113   ShouldNotCallThis();
 114   return NULL;
 115 }
 116 
 117 inline NativeCall* nativeCall_at(address address) {
 118   ShouldNotCallThis();
 119   return NULL;
 120 }
 121 
 122 class NativeMovConstReg : public NativeInstruction {
 123  public:
 124   address next_instruction_address() const {
 125     ShouldNotCallThis();
 126     return NULL;
 127   }
 128 
 129   intptr_t data() const {
 130     ShouldNotCallThis();
 131     return 0;
 132   }
 133 
 134   void set_data(intptr_t x) {
 135     ShouldNotCallThis();
 136   }
 137 };
 138 
 139 inline NativeMovConstReg* nativeMovConstReg_at(address address) {
 140   ShouldNotCallThis();
 141   return NULL;
 142 }
 143 
 144 class NativeMovRegMem : public NativeInstruction {
 145  public:
 146   int offset() const {
 147     ShouldNotCallThis();
 148     return 0;
 149   }
 150 
 151   void set_offset(intptr_t x) {
 152     ShouldNotCallThis();
 153   }
 154 
 155   void add_offset_in_bytes(int add_offset) {
 156     ShouldNotCallThis();
 157   }
 158 };
 159 
 160 inline NativeMovRegMem* nativeMovRegMem_at(address address) {
 161   ShouldNotCallThis();
 162   return NULL;
 163 }
 164 
 165 class NativeJump : public NativeInstruction {
 166  public:
 167   enum zero_specific_constants {
 168     instruction_size = 0 // not used within the interpreter
 169   };
 170 
 171   address jump_destination() const {
 172     ShouldNotCallThis();
 173     return NULL;
 174   }
 175 
 176   void set_jump_destination(address dest) {
 177     ShouldNotCallThis();
 178   }
 179 
 180   static void check_verified_entry_alignment(address entry,
 181                                              address verified_entry) {
 182   }
 183 
 184   static void patch_verified_entry(address entry,
 185                                    address verified_entry,
 186                                    address dest);
 187 };
 188 
 189 inline NativeJump* nativeJump_at(address address) {
 190   ShouldNotCallThis();
 191   return NULL;
 192 }
 193 
 194 class NativeGeneralJump : public NativeInstruction {
 195  public:
 196   address jump_destination() const {
 197     ShouldNotCallThis();
 198     return NULL;
 199   }
 200 
 201   static void insert_unconditional(address code_pos, address entry) {
 202     ShouldNotCallThis();
 203   }
 204 
 205   static void replace_mt_safe(address instr_addr, address code_buffer) {
 206     ShouldNotCallThis();
 207   }
 208 };
 209 
 210 inline NativeGeneralJump* nativeGeneralJump_at(address address) {
 211   ShouldNotCallThis();
 212   return NULL;
 213 }
 214 
 215 #endif // CPU_ZERO_VM_NATIVEINST_ZERO_HPP
src/cpu/zero/vm/nativeInst_zero.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File