< prev index next >

src/hotspot/cpu/x86/registerMap_x86.cpp

Print this page

37       if (offset_in_bytes == 0) {
38         return NULL; // ZMM16-31 are stored in full.
39       }
40     } else {
41       if (offset_in_bytes == 0 || offset_in_bytes == 16 || offset_in_bytes == 32) {
42         // Reads of the low and high 16 byte parts should be handled by location itself because
43         // they have separate callee saved entries (see RegisterSaver::save_live_registers()).
44         return NULL;
45       }
46       // The upper part of YMM0-15 and ZMM0-15 registers are saved separately in the frame.
47       if (offset_in_bytes > 32) {
48         base_reg = base_reg->next(8);
49         offset_in_bytes -= 32;
50       } else if (offset_in_bytes > 16) {
51         base_reg = base_reg->next(4);
52         offset_in_bytes -= 16;
53       } else {
54         // XMM0-15 case (0 < offset_in_bytes < 16). No need to adjust base register (or offset).
55       }
56     }
57     address base_location = location(base_reg);
58     if (base_location != NULL) {
59       return base_location + offset_in_bytes;
60     }
61   }
62   return NULL;
63 }
64 
65 address RegisterMap::pd_location(VMReg base_reg, int slot_idx) const {
66   return location(base_reg->next(slot_idx));
67 }





37       if (offset_in_bytes == 0) {
38         return NULL; // ZMM16-31 are stored in full.
39       }
40     } else {
41       if (offset_in_bytes == 0 || offset_in_bytes == 16 || offset_in_bytes == 32) {
42         // Reads of the low and high 16 byte parts should be handled by location itself because
43         // they have separate callee saved entries (see RegisterSaver::save_live_registers()).
44         return NULL;
45       }
46       // The upper part of YMM0-15 and ZMM0-15 registers are saved separately in the frame.
47       if (offset_in_bytes > 32) {
48         base_reg = base_reg->next(8);
49         offset_in_bytes -= 32;
50       } else if (offset_in_bytes > 16) {
51         base_reg = base_reg->next(4);
52         offset_in_bytes -= 16;
53       } else {
54         // XMM0-15 case (0 < offset_in_bytes < 16). No need to adjust base register (or offset).
55       }
56     }
57     address base_location = location(base_reg, (intptr_t*)NULL);
58     if (base_location != NULL) {
59       return base_location + offset_in_bytes;
60     }
61   }
62   return NULL;
63 }
64 
65 address RegisterMap::pd_location(VMReg base_reg, int slot_idx) const {
66   return location(base_reg->next(slot_idx), (intptr_t*)NULL);
67 }
68 
69 // int RegisterMap::link_offset() {
70 //   return in_bytes(byte_offset_of(RegisterMap, _location)) + (int)(sizeof(intptr_t*) * rbp->as_VMReg()->value());
71 // }
< prev index next >