From: Dale Weiler Date: Mon, 25 Nov 2013 18:25:29 +0000 (-0500) Subject: Pregenerate 2.0 for const folder since it's used often X-Git-Tag: xonotic-v0.8.0~57 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dc48af195dfdf3ef36eee04542aede8dc7812ca8;p=xonotic%2Fgmqcc.git Pregenerate 2.0 for const folder since it's used often --- diff --git a/fold.c b/fold.c index 60517a7..a66b815 100644 --- a/fold.c +++ b/fold.c @@ -230,6 +230,7 @@ fold_t *fold_init(parser_t *parser) { (void)fold_constgen_float (fold, 0.0f); (void)fold_constgen_float (fold, 1.0f); (void)fold_constgen_float (fold, -1.0f); + (void)fold_constgen_float (fold, 2.0f); (void)fold_constgen_vector(fold, vec3_create(0.0f, 0.0f, 0.0f)); (void)fold_constgen_vector(fold, vec3_create(-1.0f, -1.0f, -1.0f)); diff --git a/intrin.c b/intrin.c index a53bcd4..b2ef3ed 100644 --- a/intrin.c +++ b/intrin.c @@ -784,7 +784,7 @@ static ast_expression *intrin_pow(intrin_t *intrin) { intrin_ctx(intrin), INSTR_DIV_F, (ast_expression*)exp, - (ast_expression*)fold_constgen_float(intrin->fold, 2.0f) + (ast_expression*)intrin->fold->imm_float[3] /* 2.0f */ ) ); @@ -887,7 +887,7 @@ static ast_expression *intrin_pow(intrin_t *intrin) { intrin_ctx(intrin), INSTR_DIV_F, (ast_expression*)high, - (ast_expression*)fold_constgen_float(intrin->fold, 2.0f) + (ast_expression*)intrin->fold->imm_float[3] /* 2.0f */ ) ) ); @@ -996,7 +996,7 @@ static ast_expression *intrin_pow(intrin_t *intrin) { (ast_expression*)low, (ast_expression*)high ), - (ast_expression*)fold_constgen_float(intrin->fold, 2.0f) + (ast_expression*)intrin->fold->imm_float[3] /* 2.0f */ ) ) ); @@ -1236,7 +1236,7 @@ static ast_expression *intrin_epsilon(intrin_t *intrin) { intrin_ctx(intrin), INSTR_MUL_F, (ast_expression*)eps, - (ast_expression*)fold_constgen_float(intrin->fold, 2.0f) + (ast_expression*)intrin->fold->imm_float[3] /* 2.0f */ ) ), (ast_expression*)intrin->fold->imm_float[1] @@ -1248,7 +1248,7 @@ static ast_expression *intrin_epsilon(intrin_t *intrin) { INSTR_STORE_F, INSTR_DIV_F, (ast_expression*)eps, - (ast_expression*)fold_constgen_float(intrin->fold, 2.0f) + (ast_expression*)intrin->fold->imm_float[3] /* 2.0f */ ) ) );