From a503ec2cc7042f0d2427fcbec0237937f324c755 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20=C3=96sterlund?= Date: Mon, 9 Jan 2023 10:01:26 +0000 Subject: [PATCH] 8299608: Add Register + imm32 orq to x86_64 assembler Reviewed-by: shade, sviswanathan, kvn --- src/hotspot/cpu/x86/assembler_x86.cpp | 7 ++++++- src/hotspot/cpu/x86/assembler_x86.hpp | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/hotspot/cpu/x86/assembler_x86.cpp b/src/hotspot/cpu/x86/assembler_x86.cpp index 6446accbfac..67ff8a97c7a 100644 --- a/src/hotspot/cpu/x86/assembler_x86.cpp +++ b/src/hotspot/cpu/x86/assembler_x86.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -13453,6 +13453,11 @@ void Assembler::orq(Register dst, int32_t imm32) { emit_arith(0x81, 0xC8, dst, imm32); } +void Assembler::orq_imm32(Register dst, int32_t imm32) { + (void) prefixq_and_encode(dst->encoding()); + emit_arith_imm32(0x81, 0xC8, dst, imm32); +} + void Assembler::orq(Register dst, Address src) { InstructionMark im(this); emit_int16(get_prefixq(src, dst), 0x0B); diff --git a/src/hotspot/cpu/x86/assembler_x86.hpp b/src/hotspot/cpu/x86/assembler_x86.hpp index a300dc91dc2..a4bd8bf4864 100644 --- a/src/hotspot/cpu/x86/assembler_x86.hpp +++ b/src/hotspot/cpu/x86/assembler_x86.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1736,6 +1736,7 @@ private: void orq(Address dst, int32_t imm32); void orq(Address dst, Register src); void orq(Register dst, int32_t imm32); + void orq_imm32(Register dst, int32_t imm32); void orq(Register dst, Address src); void orq(Register dst, Register src);