[Mesa-dev] [PATCH 1/3] gallivm: support printing of 64 bit integers
Brian Paul
brianp at vmware.com
Wed Oct 9 07:27:13 PDT 2013
On 10/08/2013 01:22 PM, Zack Rusin wrote:
> only 8 and 32 bit integers were supported before.
>
> Signed-off-by: Zack Rusin <zackr at vmware.com>
> ---
> src/gallium/auxiliary/gallivm/lp_bld_printf.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_printf.c b/src/gallium/auxiliary/gallivm/lp_bld_printf.c
> index 1324da2..d06209a 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_printf.c
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_printf.c
> @@ -106,7 +106,11 @@ lp_build_print_value(struct gallivm_state *gallivm,
> type_fmt[4] = 'g';
> type_fmt[5] = '\0';
> } else if (type_kind == LLVMIntegerTypeKind) {
> - if (LLVMGetIntTypeWidth(type_ref) == 8) {
> + if (LLVMGetIntTypeWidth(type_ref) == 64) {
> + type_fmt[2] = 'l';
> + type_fmt[3] = 'd';
> + type_fmt[4] = '\0';
> + } else if (LLVMGetIntTypeWidth(type_ref) == 8) {
> type_fmt[2] = 'u';
> } else {
> type_fmt[2] = 'i';
>
LGTM.
For 1-3: Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list