I came across a small function whose only side effects were to modify the state of some processor flags. When I decompiled this function using the Hex Rays decompiler, I simply got an empty function, which is not useful at all in figuring out what the function does. Instead I had to look up each instruction in the assembly language manual and read the pseudocode to determine the net effect of the function. Is there some tool I can paste assembly instructions into and it will spit out all side effects, including flags? I'm interested in x86.
Take A Snippet of Assembly and Make All Side Effects Explicit?
assembly;x86;ida
Hex-Rays performs liveness analysis and dead code elimination, which in the case of your function, it sounds like it decided everything was dead.  I think it's impossible to tell Hex-Rays via __usercall that the return location for some function is in a flag location, so under that assumption, Hex-Rays can't help in this situation.What you want is a tool that is capable of rendering the intermediate language translation for a given instruction or block of instructions.  To that extent, tools such as BitBlaze, BAP, and miasm can help.  Also see this link for a language-agnostic interface to BAP.