RFR: 8266332: Adler32 intrinsic for x86 64-bit platforms [v10]

Xubo Zhang github.com+58006833+xbzhang99 at openjdk.java.net
Mon May 17 23:30:51 UTC 2021


On Mon, 17 May 2021 20:23:05 GMT, Xubo Zhang <github.com+58006833+xbzhang99 at openjdk.org> wrote:

>> src/hotspot/cpu/x86/macroAssembler_x86.hpp line 1322:
>> 
>>> 1320:     Assembler::vpmulld(dst, nds, src, vector_len);
>>> 1321:   }
>>> 1322:   void vpmulld(XMMRegister dst, XMMRegister nds, AddressLiteral src, int vector_len, Register scratch_reg = rscratch1);
>> 
>> Looks like my comment was lost.
>> I see only last version of method is used in stub. Why you need additional 2 wrapper methods?
>> Also the code always pass `scratch_reg` - you don't need to set default value.
>
> I think the first two were introduced by other patches
> will remove the scratch_reg

Sorry, I added first two.
The vpmulld is overloaded in base Assembler class. If I override one method in MacroAssembler class, the C++ compiler doesn’t seem to find the other overloaded functions, they somehow become hidden.
So, I need to override those as well in macroAssembler, otherwise I get the following error:
./src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp: In member function 'void C2_MacroAssembler::reduce_operation_256(BasicType, int, XMMRegister, XMMRegister, XMMRegister)':
./src/hotspot/cpu/x86/c2_MacroAssembler_x86.cpp:1573:64: error: no matching function for call to 'C2_MacroAssembler::vpmulld(XMMRegisterImpl*&, XMMRegisterImpl*&, XMMRegisterImpl*&, int&)'

-------------

PR: https://git.openjdk.java.net/jdk/pull/3806


More information about the hotspot-compiler-dev mailing list