< prev index next >

src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


 438 private:
 439 
 440   void mov_immediate64(Register dst, u_int64_t imm64);
 441   void mov_immediate32(Register dst, u_int32_t imm32);
 442 
 443   int push(unsigned int bitset, Register stack);
 444   int pop(unsigned int bitset, Register stack);
 445 
 446   void mov(Register dst, Address a);
 447 
 448 public:
 449   void push(RegSet regs, Register stack) { if (regs.bits()) push(regs.bits(), stack); }
 450   void pop(RegSet regs, Register stack) { if (regs.bits()) pop(regs.bits(), stack); }
 451 
 452   // Push and pop everything that might be clobbered by a native
 453   // runtime call except rscratch1 and rscratch2.  (They are always
 454   // scratch, so we don't have to protect them.)  Only save the lower
 455   // 64 bits of each vector register.
 456   void push_call_clobbered_registers();
 457   void pop_call_clobbered_registers();


 458 
 459   // now mov instructions for loading absolute addresses and 32 or
 460   // 64 bit integers
 461 
 462   inline void mov(Register dst, address addr)
 463   {
 464     mov_immediate64(dst, (u_int64_t)addr);
 465   }
 466 
 467   inline void mov(Register dst, u_int64_t imm64)
 468   {
 469     mov_immediate64(dst, imm64);
 470   }
 471 
 472   inline void movw(Register dst, u_int32_t imm32)
 473   {
 474     mov_immediate32(dst, imm32);
 475   }
 476 
 477   inline void mov(Register dst, long l)


   1 /*
   2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * Copyright (c) 2014, 2018, Red Hat, Inc. All rights reserved.
   4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   5  *
   6  * This code is free software; you can redistribute it and/or modify it
   7  * under the terms of the GNU General Public License version 2 only, as
   8  * published by the Free Software Foundation.
   9  *
  10  * This code is distributed in the hope that it will be useful, but WITHOUT
  11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  13  * version 2 for more details (a copy is included in the LICENSE file that
  14  * accompanied this code).
  15  *
  16  * You should have received a copy of the GNU General Public License version
  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *


 438 private:
 439 
 440   void mov_immediate64(Register dst, u_int64_t imm64);
 441   void mov_immediate32(Register dst, u_int32_t imm32);
 442 
 443   int push(unsigned int bitset, Register stack);
 444   int pop(unsigned int bitset, Register stack);
 445 
 446   void mov(Register dst, Address a);
 447 
 448 public:
 449   void push(RegSet regs, Register stack) { if (regs.bits()) push(regs.bits(), stack); }
 450   void pop(RegSet regs, Register stack) { if (regs.bits()) pop(regs.bits(), stack); }
 451 
 452   // Push and pop everything that might be clobbered by a native
 453   // runtime call except rscratch1 and rscratch2.  (They are always
 454   // scratch, so we don't have to protect them.)  Only save the lower
 455   // 64 bits of each vector register.
 456   void push_call_clobbered_registers();
 457   void pop_call_clobbered_registers();
 458   void push_call_clobbered_fp_registers();
 459   void pop_call_clobbered_fp_registers();
 460 
 461   // now mov instructions for loading absolute addresses and 32 or
 462   // 64 bit integers
 463 
 464   inline void mov(Register dst, address addr)
 465   {
 466     mov_immediate64(dst, (u_int64_t)addr);
 467   }
 468 
 469   inline void mov(Register dst, u_int64_t imm64)
 470   {
 471     mov_immediate64(dst, imm64);
 472   }
 473 
 474   inline void movw(Register dst, u_int32_t imm32)
 475   {
 476     mov_immediate32(dst, imm32);
 477   }
 478 
 479   inline void mov(Register dst, long l)


< prev index next >