41 // Type: [3..0]
42 // Where: [4]
43 // Offset: [31..5]
44
45 class Location {
46 friend class VMStructs;
47 public:
48 enum Where {
49 on_stack,
50 in_register
51 };
52
53 enum Type {
54 invalid, // Invalid location
55 normal, // Ints, floats, double halves
56 oop, // Oop (please GC me!)
57 int_in_long, // Integer held in long register
58 lng, // Long held in one register
59 float_in_dbl, // Float held in double register
60 dbl, // Double held in one register
61 addr, // JSR return address
62 narrowoop // Narrow Oop (please GC me!)
63 };
64
65
66 private:
67 enum {
68 TYPE_MASK = (juint) 0x0F,
69 TYPE_SHIFT = 0,
70 WHERE_MASK = (juint) 0x10,
71 WHERE_SHIFT = 4,
72 OFFSET_MASK = (juint) 0xFFFFFFE0,
73 OFFSET_SHIFT = 5
74 };
75
76 juint _value;
77
78 // Create a bit-packed Location
79 Location(Where where_, Type type_, unsigned offset_) {
80 set(where_, type_, offset_);
|
41 // Type: [3..0]
42 // Where: [4]
43 // Offset: [31..5]
44
45 class Location {
46 friend class VMStructs;
47 public:
48 enum Where {
49 on_stack,
50 in_register
51 };
52
53 enum Type {
54 invalid, // Invalid location
55 normal, // Ints, floats, double halves
56 oop, // Oop (please GC me!)
57 int_in_long, // Integer held in long register
58 lng, // Long held in one register
59 float_in_dbl, // Float held in double register
60 dbl, // Double held in one register
61 vector, // Vector in one register
62 addr, // JSR return address
63 narrowoop // Narrow Oop (please GC me!)
64 };
65
66
67 private:
68 enum {
69 TYPE_MASK = (juint) 0x0F,
70 TYPE_SHIFT = 0,
71 WHERE_MASK = (juint) 0x10,
72 WHERE_SHIFT = 4,
73 OFFSET_MASK = (juint) 0xFFFFFFE0,
74 OFFSET_SHIFT = 5
75 };
76
77 juint _value;
78
79 // Create a bit-packed Location
80 Location(Where where_, Type type_, unsigned offset_) {
81 set(where_, type_, offset_);
|