7319 %}
7320
7321 // Load Klass Pointer
7322 instruct loadKlass(iRegPNoSp dst, memory8 mem)
7323 %{
7324 match(Set dst (LoadKlass mem));
7325 predicate(!needs_acquiring_load(n));
7326
7327 ins_cost(4 * INSN_COST);
7328 format %{ "ldr $dst, $mem\t# class" %}
7329
7330 ins_encode(aarch64_enc_ldr(dst, mem));
7331
7332 ins_pipe(iload_reg_mem);
7333 %}
7334
7335 // Load Narrow Klass Pointer
7336 instruct loadNKlass(iRegNNoSp dst, memory4 mem)
7337 %{
7338 match(Set dst (LoadNKlass mem));
7339 predicate(!needs_acquiring_load(n));
7340
7341 ins_cost(4 * INSN_COST);
7342 format %{ "ldrw $dst, $mem\t# compressed class ptr" %}
7343
7344 ins_encode(aarch64_enc_ldrw(dst, mem));
7345
7346 ins_pipe(iload_reg_mem);
7347 %}
7348
7349 // Load Float
7350 instruct loadF(vRegF dst, memory4 mem)
7351 %{
7352 match(Set dst (LoadF mem));
7353 predicate(!needs_acquiring_load(n));
7354
7355 ins_cost(4 * INSN_COST);
7356 format %{ "ldrs $dst, $mem\t# float" %}
7357
7358 ins_encode( aarch64_enc_ldrs(dst, mem) );
7359
7360 ins_pipe(pipe_class_memory);
7361 %}
7362
7363 // Load Double
7364 instruct loadD(vRegD dst, memory8 mem)
7365 %{
7366 match(Set dst (LoadD mem));
7367 predicate(!needs_acquiring_load(n));
7368
|
7319 %}
7320
7321 // Load Klass Pointer
7322 instruct loadKlass(iRegPNoSp dst, memory8 mem)
7323 %{
7324 match(Set dst (LoadKlass mem));
7325 predicate(!needs_acquiring_load(n));
7326
7327 ins_cost(4 * INSN_COST);
7328 format %{ "ldr $dst, $mem\t# class" %}
7329
7330 ins_encode(aarch64_enc_ldr(dst, mem));
7331
7332 ins_pipe(iload_reg_mem);
7333 %}
7334
7335 // Load Narrow Klass Pointer
7336 instruct loadNKlass(iRegNNoSp dst, memory4 mem)
7337 %{
7338 match(Set dst (LoadNKlass mem));
7339 predicate(!needs_acquiring_load(n) && !UseCompactObjectHeaders);
7340
7341 ins_cost(4 * INSN_COST);
7342 format %{ "ldrw $dst, $mem\t# compressed class ptr" %}
7343
7344 ins_encode(aarch64_enc_ldrw(dst, mem));
7345
7346 ins_pipe(iload_reg_mem);
7347 %}
7348
7349 instruct loadNKlassLilliput(iRegNNoSp dst, memory4 mem, rFlagsReg cr)
7350 %{
7351 match(Set dst (LoadNKlass mem));
7352 effect(TEMP_DEF dst, KILL cr);
7353 predicate(!needs_acquiring_load(n) && UseCompactObjectHeaders);
7354
7355 ins_cost(4 * INSN_COST);
7356 format %{ "ldrw $dst, $mem\t# compressed class ptr" %}
7357 ins_encode %{
7358 assert($mem$$disp == oopDesc::klass_offset_in_bytes(), "expect correct offset");
7359 assert($mem$$index$$Register == noreg, "expect no index");
7360 Register dst = $dst$$Register;
7361 Register obj = $mem$$base$$Register;
7362 C2LoadNKlassStub* stub = new (Compile::current()->comp_arena()) C2LoadNKlassStub(dst);
7363 Compile::current()->output()->add_stub(stub);
7364 __ ldr(dst, Address(obj, oopDesc::mark_offset_in_bytes()));
7365 // NOTE: We can't use tbnz here, because the target is sometimes too far away
7366 // and cannot be encoded.
7367 __ tst(dst, markWord::monitor_value);
7368 __ br(Assembler::NE, stub->entry());
7369 __ bind(stub->continuation());
7370 __ lsr(dst, dst, markWord::klass_shift);
7371 %}
7372 ins_pipe(pipe_slow);
7373 %}
7374
7375 // Load Float
7376 instruct loadF(vRegF dst, memory4 mem)
7377 %{
7378 match(Set dst (LoadF mem));
7379 predicate(!needs_acquiring_load(n));
7380
7381 ins_cost(4 * INSN_COST);
7382 format %{ "ldrs $dst, $mem\t# float" %}
7383
7384 ins_encode( aarch64_enc_ldrs(dst, mem) );
7385
7386 ins_pipe(pipe_class_memory);
7387 %}
7388
7389 // Load Double
7390 instruct loadD(vRegD dst, memory8 mem)
7391 %{
7392 match(Set dst (LoadD mem));
7393 predicate(!needs_acquiring_load(n));
7394
|