DynamoRIO / DynamoRIO/dynamorio

VZEROUPPER zeroes ymm registers too and so is incorrect in instr_zeroes_ymmh()

Open
#6,217 2 comments 0 reactions 0 assignees View on GitHub
Component-IR
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

VZEROALL and VZEROUPPER do not have any operands in DR"s IR today (maybe because of #1382 where general AVX v* opcodes zeroing top bits was decided to not become a first-class IR concept?). Thus they are special-cased in instr_zeroes_ymmh() and instr_zeroes_zmmh(). Yet VZEROUPPER is not considered in instr_zeroes_ymmh() where it returns false. This seems incorrect. All the docs say it zeroes ymmh; old docs stop there (https://www.laruence.com/x86/VZEROUPPER.html, https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/2021-8/mm256-zeroupper.html) but the latest manual and other docs include zmmh (https://www.felixcloutier.com/x86/vzeroupper, official manual). So you could maybe understand it being the reverse in our original code, but how it is now doesn't make sense.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.