< prev index next >

src/cpu/x86/vm/assembler_x86.cpp

Print this page

        

@@ -186,14 +186,13 @@
 
 // Convert the raw encoding form into the form expected by the constructor for
 // Address.  An index of 4 (rsp) corresponds to having no index, so convert
 // that to noreg for the Address constructor.
 Address Address::make_raw(int base, int index, int scale, int disp, relocInfo::relocType disp_reloc) {
-  RelocationHolder rspec;
-  if (disp_reloc != relocInfo::none) {
-    rspec = Relocation::spec_simple(disp_reloc);
-  }
+  RelocationHolder rspec = (disp_reloc == relocInfo::none)
+                                  ? RelocationHolder::none
+                                  : rspec = Relocation::spec_simple(disp_reloc);
   bool valid_index = index != rsp->encoding();
   if (valid_index) {
     Address madr(as_Register(base), as_Register(index), (Address::ScaleFactor)scale, in_ByteSize(disp));
     madr._rspec = rspec;
     return madr;
< prev index next >