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 20ff119 commit c19f86dCopy full SHA for c19f86d
src/hotspot/share/adlc/output_h.cpp
@@ -856,7 +856,8 @@ void ArchDesc::declare_pipe_classes(FILE *fp_hpp) {
856
fprintf(fp_hpp, " }\n\n");
857
fprintf(fp_hpp, " void step(uint cycles) {\n");
858
fprintf(fp_hpp, " _used = 0;\n");
859
- fprintf(fp_hpp, " _mask <<= cycles;\n");
+ fprintf(fp_hpp, " uint max_shift = 8 * sizeof(_mask) - 1;\n");
860
+ fprintf(fp_hpp, " _mask <<= (cycles < max_shift) ? cycles : max_shift;\n");
861
862
fprintf(fp_hpp, " friend class Pipeline_Use;\n");
863
fprintf(fp_hpp, "};\n\n");
0 commit comments