jyknight added inline comments.

================
Comment at: clang/include/clang/Basic/AttrDocs.td:6271
+This attribute, when attached to a function, causes the compiler to zero a
+subset of all call-used registers before the function returns. It's used to
+increase program security by either mitigating `Return-Oriented Programming`_
----------------
I think we need to define "call-used" here. It's not a very common name for 
this concept, and it's especially confusing because of the double-use of the 
word "used". I was really confused by the definition of the "all" choice when 
first reading it -- thinking "Wait, 'all' also only clears the registers which 
were used? How's that different than 'used', then? Ooooohhhh, 'call-used' 
doesn't mean it IS USED in the call, only that it's not guaranteed to be 
PRESERVED."

Suggestion for text:
The term "call-used" means registers which are not guaranteed to be preserved 
unchanged for the caller by the current calling convention. This could also be 
described as "caller-saved" or "not callee-saved".




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110869/new/

https://reviews.llvm.org/D110869

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to