Pokechu22

Results 159 comments of Pokechu22

I was able to hack this into working by adding `max-width: 1px` to the ``. Maybe this isn't the best fix but it seems to be working for me.

Hm, yeah. It doesn't seem to be correct. [Here's a codepen](https://codepen.io/anon/pen/mqoKQX). It _does_ improve the appearance, and for the problem I had, it worked, but for the given example it's...

The decompiler is actually outputting `BADTYPE`; it looks like `genericTypeName` uses `BADTYPE` in [its default case](https://github.com/NationalSecurityAgency/ghidra/blob/48e9000850ddfcab27cf453d7ad9c679ec77656e/Ghidra/Features/Decompiler/src/decompile/cpp/printc.cc#L3092-L3094). I'll look into those implementations and see if there's something done there I can...

Hmm, I'm still not sure how to fix it. I think it comes from me changing `CPUI_INT_RIGHT` or `CPUI_INT_SRIGHT` to `CPUI_INT_EQUAL`, while all the other cases in ruleaction only change...

I'm not entirely sure how you get a `Datatype` object for a builtin type. There also isn't a direct setter for the type, only `setTempType` and `updateType`, nor is there...

I've settled on this: ```C++ // Becomes a comparison with zero PcodeOp* newOp = data.newOp(2, baseOp->getAddr()); data.opSetOpcode(newOp, CPUI_INT_EQUAL); Varnode* b = data.newConstant(outVn->getSize(), 0); data.opSetInput(newOp, op->getIn(0), 0); data.opSetInput(newOp, b, 1); Varnode*...

> The rule isn't going to be applied here. There is no right shift. Right, the point of that example was to show that when the rule wasn't applied, `BADTYPE`...

I'm not sure I understand you. If you're suggesting that the `BADTYPE` could come from just `countLeadingZeros(a ^ 3) >> 5` without the rule, then I think that is possible,...

Oh. Yeah, that's a typo (but `a ^ 3 == 0` is equivalent to `a == 3` ([RuleXorCollapse](https://github.com/NationalSecurityAgency/ghidra/blob/79fce9b032ffbe4f7e0e1582b0f690830144418c/Ghidra/Features/Decompiler/src/decompile/cpp/ruleaction.cc#L3665-L3702)) and `a - 3 == 0` is _also_ equivalent to `a ==...

`newUniqueOut(1, newOp)` seems to work, though it results in the same casts to `undefined4` that explicitly setting `TYPE_BOOL` produces, along with override signature detecting `bool`. I've changed to use that....