We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a31061 commit d783a94Copy full SHA for d783a94
src/hotspot/share/adlc/output_h.cpp
@@ -870,7 +870,8 @@ void ArchDesc::declare_pipe_classes(FILE *fp_hpp) {
870
fprintf(fp_hpp, " }\n\n");
871
fprintf(fp_hpp, " void step(uint cycles) {\n");
872
fprintf(fp_hpp, " _used = 0;\n");
873
- fprintf(fp_hpp, " _mask <<= cycles;\n");
+ fprintf(fp_hpp, " uint max_shift = 8 * sizeof(_mask) - 1;\n");
874
+ fprintf(fp_hpp, " _mask <<= (cycles < max_shift) ? cycles : max_shift;\n");
875
876
fprintf(fp_hpp, " friend class Pipeline_Use;\n");
877
fprintf(fp_hpp, "};\n\n");
0 commit comments