[Mesa-dev] [PATCH 3/3] gallivm: add integer and unsigned mod arit functions.

Dave Airlie airlied at gmail.com
Sat Feb 18 00:29:28 PST 2012

On Fri, Feb 17, 2012 at 9:46 PM, Jose Fonseca <jfonseca at vmware.com> wrote:
> Dave,
> Ideally there should be only one lp_build_mod() which will invoke LLVMBuildSRem or LLVMBuildURem depending on the value of bld->type.sign.  The point being that this allows the same code generation logic to seemingly target any type without having to worry too much which target it is targeting.

Yeah I agree with this for now, but I'm starting to think a lot of
this stuff is redunant once I looked at what Tom has done.

The thing is TGSI doesn't have that many crazy options where you are
going to be targetting instructions at the wrong type, and wrapping
all the basic llvm interfaces with an extra type layer seems to me
long term like a waste of time.

I'm happy for now to finish the integer support in the same style as
the current code, but I think moving forward afterwards it might be
worth investigating a more direct instruction emission scheme. Perhaps
Tom can comment also from his experience.


More information about the mesa-dev mailing list