hotspot/src/share/vm/asm/codeBuffer.hpp
changeset 14625 b02f361c324e
parent 13887 89b873bcc55b
child 14626 0cf4eccf130f
--- a/hotspot/src/share/vm/asm/codeBuffer.hpp	Tue Nov 27 17:41:38 2012 -0800
+++ b/hotspot/src/share/vm/asm/codeBuffer.hpp	Fri Nov 30 11:44:05 2012 -0800
@@ -30,8 +30,6 @@
 #include "code/relocInfo.hpp"
 
 class  CodeComments;
-class  AbstractAssembler;
-class  MacroAssembler;
 class  PhaseCFG;
 class  Compile;
 class  BufferBlob;
@@ -194,10 +192,14 @@
   }
 
   // Code emission
-  void emit_int8 (int8_t  x) { *((int8_t*)  end()) = x; set_end(end() + 1); }
-  void emit_int16(int16_t x) { *((int16_t*) end()) = x; set_end(end() + 2); }
-  void emit_int32(int32_t x) { *((int32_t*) end()) = x; set_end(end() + 4); }
-  void emit_int64(int64_t x) { *((int64_t*) end()) = x; set_end(end() + 8); }
+  void emit_int8 ( int8_t  x)  { *((int8_t*)  end()) = x; set_end(end() + sizeof(int8_t)); }
+  void emit_int16( int16_t x)  { *((int16_t*) end()) = x; set_end(end() + sizeof(int16_t)); }
+  void emit_int32( int32_t x)  { *((int32_t*) end()) = x; set_end(end() + sizeof(int32_t)); }
+  void emit_int64( int64_t x)  { *((int64_t*) end()) = x; set_end(end() + sizeof(int64_t)); }
+
+  void emit_float( jfloat  x)  { *((jfloat*)  end()) = x; set_end(end() + sizeof(jfloat)); }
+  void emit_double(jdouble x)  { *((jdouble*) end()) = x; set_end(end() + sizeof(jdouble)); }
+  void emit_address(address x) { *((address*) end()) = x; set_end(end() + sizeof(address)); }
 
   // Share a scratch buffer for relocinfo.  (Hacky; saves a resource allocation.)
   void initialize_shared_locs(relocInfo* buf, int length);