src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp
changeset 59304 643d9cf3d8fc
parent 58925 9bbe560e8131
equal deleted inserted replaced
59303:1d6e62764eee 59304:643d9cf3d8fc
   579         assert(to_addr->disp() == 0, "Not yet supporting both");
   579         assert(to_addr->disp() == 0, "Not yet supporting both");
   580         __ add(Rtemp, base_reg, to_addr->index()->as_register());
   580         __ add(Rtemp, base_reg, to_addr->index()->as_register());
   581         base_reg = Rtemp;
   581         base_reg = Rtemp;
   582         __ str(from_lo, Address(Rtemp));
   582         __ str(from_lo, Address(Rtemp));
   583         if (patch != NULL) {
   583         if (patch != NULL) {
       
   584           __ nop(); // see comment before patching_epilog for 2nd str
   584           patching_epilog(patch, lir_patch_low, base_reg, info);
   585           patching_epilog(patch, lir_patch_low, base_reg, info);
   585           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   586           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   586           patch_code = lir_patch_high;
   587           patch_code = lir_patch_high;
   587         }
   588         }
   588         __ str(from_hi, Address(Rtemp, BytesPerWord));
   589         __ str(from_hi, Address(Rtemp, BytesPerWord));
   589       } else if (base_reg == from_lo) {
   590       } else if (base_reg == from_lo) {
   590         __ str(from_hi, as_Address_hi(to_addr));
   591         __ str(from_hi, as_Address_hi(to_addr));
   591         if (patch != NULL) {
   592         if (patch != NULL) {
       
   593           __ nop(); // see comment before patching_epilog for 2nd str
   592           patching_epilog(patch, lir_patch_high, base_reg, info);
   594           patching_epilog(patch, lir_patch_high, base_reg, info);
   593           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   595           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   594           patch_code = lir_patch_low;
   596           patch_code = lir_patch_low;
   595         }
   597         }
   596         __ str(from_lo, as_Address_lo(to_addr));
   598         __ str(from_lo, as_Address_lo(to_addr));
   597       } else {
   599       } else {
   598         __ str(from_lo, as_Address_lo(to_addr));
   600         __ str(from_lo, as_Address_lo(to_addr));
   599         if (patch != NULL) {
   601         if (patch != NULL) {
       
   602           __ nop(); // see comment before patching_epilog for 2nd str
   600           patching_epilog(patch, lir_patch_low, base_reg, info);
   603           patching_epilog(patch, lir_patch_low, base_reg, info);
   601           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   604           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   602           patch_code = lir_patch_high;
   605           patch_code = lir_patch_high;
   603         }
   606         }
   604         __ str(from_hi, as_Address_hi(to_addr));
   607         __ str(from_hi, as_Address_hi(to_addr));
   638   if (info != NULL) {
   641   if (info != NULL) {
   639     add_debug_info_for_null_check(null_check_offset, info);
   642     add_debug_info_for_null_check(null_check_offset, info);
   640   }
   643   }
   641 
   644 
   642   if (patch != NULL) {
   645   if (patch != NULL) {
   643     // Offset embeedded into LDR/STR instruction may appear not enough
   646     // Offset embedded into LDR/STR instruction may appear not enough
   644     // to address a field. So, provide a space for one more instruction
   647     // to address a field. So, provide a space for one more instruction
   645     // that will deal with larger offsets.
   648     // that will deal with larger offsets.
   646     __ nop();
   649     __ nop();
   647     patching_epilog(patch, patch_code, base_reg, info);
   650     patching_epilog(patch, patch_code, base_reg, info);
   648   }
   651   }
   789         assert(addr->disp() == 0, "Not yet supporting both");
   792         assert(addr->disp() == 0, "Not yet supporting both");
   790         __ add(Rtemp, base_reg, addr->index()->as_register());
   793         __ add(Rtemp, base_reg, addr->index()->as_register());
   791         base_reg = Rtemp;
   794         base_reg = Rtemp;
   792         __ ldr(to_lo, Address(Rtemp));
   795         __ ldr(to_lo, Address(Rtemp));
   793         if (patch != NULL) {
   796         if (patch != NULL) {
       
   797           __ nop(); // see comment before patching_epilog for 2nd ldr
   794           patching_epilog(patch, lir_patch_low, base_reg, info);
   798           patching_epilog(patch, lir_patch_low, base_reg, info);
   795           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   799           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   796           patch_code = lir_patch_high;
   800           patch_code = lir_patch_high;
   797         }
   801         }
   798         __ ldr(to_hi, Address(Rtemp, BytesPerWord));
   802         __ ldr(to_hi, Address(Rtemp, BytesPerWord));
   799       } else if (base_reg == to_lo) {
   803       } else if (base_reg == to_lo) {
   800         __ ldr(to_hi, as_Address_hi(addr));
   804         __ ldr(to_hi, as_Address_hi(addr));
   801         if (patch != NULL) {
   805         if (patch != NULL) {
       
   806           __ nop(); // see comment before patching_epilog for 2nd ldr
   802           patching_epilog(patch, lir_patch_high, base_reg, info);
   807           patching_epilog(patch, lir_patch_high, base_reg, info);
   803           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   808           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   804           patch_code = lir_patch_low;
   809           patch_code = lir_patch_low;
   805         }
   810         }
   806         __ ldr(to_lo, as_Address_lo(addr));
   811         __ ldr(to_lo, as_Address_lo(addr));
   807       } else {
   812       } else {
   808         __ ldr(to_lo, as_Address_lo(addr));
   813         __ ldr(to_lo, as_Address_lo(addr));
   809         if (patch != NULL) {
   814         if (patch != NULL) {
       
   815           __ nop(); // see comment before patching_epilog for 2nd ldr
   810           patching_epilog(patch, lir_patch_low, base_reg, info);
   816           patching_epilog(patch, lir_patch_low, base_reg, info);
   811           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   817           patch = new PatchingStub(_masm, PatchingStub::access_field_id);
   812           patch_code = lir_patch_high;
   818           patch_code = lir_patch_high;
   813         }
   819         }
   814         __ ldr(to_hi, as_Address_hi(addr));
   820         __ ldr(to_hi, as_Address_hi(addr));
   844     default:
   850     default:
   845       ShouldNotReachHere();
   851       ShouldNotReachHere();
   846   }
   852   }
   847 
   853 
   848   if (patch != NULL) {
   854   if (patch != NULL) {
   849     // Offset embeedded into LDR/STR instruction may appear not enough
   855     // Offset embedded into LDR/STR instruction may appear not enough
   850     // to address a field. So, provide a space for one more instruction
   856     // to address a field. So, provide a space for one more instruction
   851     // that will deal with larger offsets.
   857     // that will deal with larger offsets.
   852     __ nop();
   858     __ nop();
   853     patching_epilog(patch, patch_code, base_reg, info);
   859     patching_epilog(patch, patch_code, base_reg, info);
   854   }
   860   }