Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cmd/compile: add OpAMD64CMPptr and friends? #20873
amd64.rules contains a fair number of rules that are conditional on config.PtrSize, to support amd64p32. See CL 46870 for a recent example. To reduce duplication, I suggest we add ops whose lowering depends on pointer size. So for example, instead of:
we would have only:
where CMPptr is treated as CMPQ for amd64 and CMPL for amd64p32. Similarly so for other such duplicated rules.
Sounds ok to me. You are, however, trading verbosity in some places for verbosity elsewhere.