Displaying 20 results from an estimated 46 matches for "lval".
Did you mean:
_val
2017 Aug 19
1
[PATCH] nv50/ra: Only increment DefValue counter if we are going to spill
.../gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
@@ -1750,8 +1750,7 @@ SpillCodeInserter::run(const std::list<ValuePair>& lst)
// multiple destinations that all need to be spilled (like OP_SPLIT).
unordered_set<Instruction *> to_del;
- for (Value::DefIterator d = lval->defs.begin(); d != lval->defs.end();
- ++d) {
+ for (Value::DefIterator d = lval->defs.begin(); d != lval->defs.end();) {
Value *slot = mem ?
static_cast<Value *>(mem) : new_LValue(func, FILE_GPR);
Value *tmp = NULL;
@@ -1787,13 +17...
2014 Sep 01
0
[PATCH] nv50/ir: use unordered_set instead of list to keep track of var defs
...iff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
index 255324f..e9c6c21 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
@@ -205,19 +205,25 @@ const LValue *ValueDef::preSSA() const
Instruction *Value::getInsn() const
{
- return defs.empty() ? NULL : defs.front()->getInsn();
+ return defs.empty() ? NULL : (*defs.begin())->getInsn();
+}
+
+Instruction *Value::findOwnDefInsn() const
+{
+ for (DefCIterator it = defs.begin(); it != defs....
2007 Apr 12
0
Branch 'as' - 15 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c
...96e..9e052c4 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -797,48 +797,45 @@ swfdec_action_add2 (SwfdecAsContext *cx,
}
}
-#if 0
static void
swfdec_action_new_comparison_6 (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
{
- jsval lval, rval;
double d, d2;
- rval = cx->fp->sp[-1];
- lval = cx->fp->sp[-2];
- cx->fp->sp--;
- d = swfdec_value_to_number (cx, lval);
- d2 = swfdec_value_to_number (cx, rval);
+ d2 = swfdec_as_value_to_number (cx, swfdec_as_stack_peek (cx->frame->stack, 1));
+ d = swfd...
2007 May 29
0
Branch 'as' - 8 commits - libswfdec/Makefile.am libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_math.h libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c
...uals2 action correctly
diff --git a/libswfdec/swfdec_as_interpret.c b/libswfdec/swfdec_as_interpret.c
index 70f5f78..59dcf68 100644
--- a/libswfdec/swfdec_as_interpret.c
+++ b/libswfdec/swfdec_as_interpret.c
@@ -968,48 +968,84 @@ swfdec_action_equals2 (SwfdecAsContext *
{
SwfdecAsValue *rval, *lval;
SwfdecAsType ltype, rtype;
+ double l, r;
gboolean cond;
rval = swfdec_as_stack_peek (cx->frame->stack, 1);
lval = swfdec_as_stack_peek (cx->frame->stack, 2);
ltype = lval->type;
rtype = rval->type;
- if (ltype == rtype) {
- switch (ltype) {
- case S...
2011 Apr 22
3
[LLVMdev] copy instructions
...eft->codeGen();
Value *r = right->codeGen();
Value *result = new TempValue; // get unique temporary
emit(result->str() + " add " + l->str() + ", " r-str());
return result;
}
Value *assignExpression::codeGen() {
Value *rval = rvalue->codeGen();
Value *lval = new NameValue(ident);
emit(lval->str() + " = " + rval->str()); // emit (silly) copy instruction
return lval;
}
What I have suggested to my students is to omit the (non-existent) copy instruction
and use the "rval" above as a replacement for all future occurrences...
2008 Aug 04
0
Unexpected nls behaviour: Solved
...atch
xy <- sortedXyData(mCall[["Batch"]], LHS, data)
Batch <- data[[as.character(mCall[["Batch"]])]]
# check Batch is successive integers starting at 1
if ((min(xy$x) !=1) | (any(diff(xy$x)!=1))) stop(
"Batch is not a successive integers sequence")
Lval <- list(xy$y)
names(Lval) <- mCall["Coeffs"]
Lval
}
, parameters = c("Coeffs")
)
Sorry for wasting anyones time.
Keith Jewell
-------------------------------------------------
"Keith Jewell" <k.jewell at campden.co.uk> wrote in message news:...
> Hi...
2014 Dec 02
0
[PATCH RESEND] nv50/ir: use unordered_set instead of list to keep track of var defs
...iff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
index 255324f..471d47f 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
@@ -205,21 +205,26 @@ const LValue *ValueDef::preSSA() const
Instruction *Value::getInsn() const
{
- return defs.empty() ? NULL : defs.front()->getInsn();
+ return defs.empty() ? NULL : (*defs.begin())->getInsn();
}
-Instruction *Value::getUniqueInsn() const
+Instruction *Value::getUniqueInsnMerged() const
{...
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...= JSVAL_TO_OBJECT (val);
+
+ if (!JS_SetProperty (cx, jsobj, properties[id], &cx->fp->sp[-1]))
+ return JS_FALSE;
+
+out:
+ cx->fp->sp -= 3;
+ return JS_TRUE;
+}
+
+static void
+swfdec_action_binary (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
+{
+ jsval lval, rval;
+ double l, r;
+
+ rval = cx->fp->sp[-1];
+ lval = cx->fp->sp[-2];
+ if (((SwfdecScript *) cx->fp->swf)->version < 7) {
+ l = swfdec_value_to_number (cx, lval);
+ r = swfdec_value_to_number (cx, rval);
+ } else {
+ if (!swfdec_value_to_number_7 (cx, lval...
2007 Jan 29
0
Branch 'interpreter' - 18 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_sound.c libswfdec/swfdec_pattern.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_script.c
...ta));
+ cx->fp->pc += 5 + GINT16_FROM_LE (*((gint16*) data));
return JS_TRUE;
}
@@ -899,6 +899,56 @@ swfdec_action_less (JSContext *cx, guint
return JS_TRUE;
}
+static JSBool
+swfdec_action_equals2 (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ jsval rval, lval;
+ int ltag, rtag;
+ JSBool cond;
+
+ rval = cx->fp->sp[-1];
+ lval = cx->fp->sp[-2];
+ ltag = JSVAL_TAG(lval);
+ rtag = JSVAL_TAG(rval);
+ if (ltag == rtag) {
+ if (ltag == JSVAL_STRING) {
+ cond = js_CompareStrings (JSVAL_TO_STRING (lval), JSVAL_TO_STRING (rval)) == 0;...
2011 Apr 23
2
[LLVMdev] copy instructions
...ght->codeGen();
> Value *result = new TempValue; // get unique temporary
> emit(result->str() + " add " + l->str() + ", " r-str());
> return result;
> }
>
> Value *assignExpression::codeGen() {
> Value *rval = rvalue->codeGen();
> Value *lval = new NameValue(ident);
> emit(lval->str() + " = " + rval->str()); // emit (silly) copy instruction
> return lval;
> }
>
> What I have suggested to my students is to omit the (non-existent) copy instruction
> and use the "rval" above as a replacement...
2011 Apr 23
0
[LLVMdev] copy instructions
...ght->codeGen();
> Value *result = new TempValue; // get unique temporary
> emit(result->str() + " add " + l->str() + ", " r-str());
> return result;
> }
>
> Value *assignExpression::codeGen() {
> Value *rval = rvalue->codeGen();
> Value *lval = new NameValue(ident);
> emit(lval->str() + " = " + rval->str()); // emit (silly) copy instruction
> return lval;
> }
>
> What I have suggested to my students is to omit the (non-existent) copy instruction
> and use the "rval" above as a replacement...
2017 Aug 17
3
How do set 'nest' addribute in an indirect call?
...is relevant.
Here are some relevant debugger lines:
(m3gdb) frame 7
#7 0x00000000004264fd in M3CG_LLVM__InnerCallIndirect (self=16_0000000001b30830, proc=16_0000000001a7e388, t=Void,
cc=16_0000000001b07928, Nested=TRUE) at ../src/M3CG_LLVM.m3:4750
4750 LLVM.LLVMAddAttribute(actual.lVal, LLVM.NestAttribute);
Current language: auto; currently Modula-3
(m3gdb) p M3CG_LLVM__DumpLvVal(actual.lVal)
%load_ind13 = load i8** %load_ind_toptr12
$1 = <void>
(m3gdb) p M3CG_LLVM__LvType(actual.lVal)
$2 = 16_0000000001a78620
(m3gdb) p M3CG_LLVM__DumpLvType($2)
i8*
$3 = <void>
(m...
2007 Feb 01
0
Branch 'interpreter' - 9 commits - libswfdec/js libswfdec/swfdec_script.c libswfdec/swfdec_script.h player/swfdec_debug_stack.c test/trace
...if (JSVAL_IS_NULL (val)) {
+ *d = *cx->runtime->jsNaN;
+ return JS_TRUE;
+ } else {
+ return JS_ValueToNumber (cx, val, d);
+ }
+}
+
/*** ALL THE ACTION IS HERE ***/
static JSBool
@@ -700,8 +711,8 @@ swfdec_action_binary (JSContext *cx, gui
l = swfdec_action_to_number (cx, lval);
r = swfdec_action_to_number (cx, rval);
} else {
- if (!JS_ValueToNumber(cx, lval, &l) ||
- !JS_ValueToNumber(cx, rval, &r))
+ if (!swfdec_value_to_number_7 (cx, lval, &l) ||
+ !swfdec_value_to_number_7 (cx, rval, &r))
return JS_FALSE;
}
cx...
2007 Mar 05
0
11 commits - configure.ac libswfdec/swfdec_js_movie.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_movie.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_swf_decoder.c
...ie)->sprite, name);
} else {
/* FIXME: how do we treat undefined etc? */
- frame = swfdec_action_to_number (cx, val);
+ frame = swfdec_value_to_number (cx, val);
}
return frame;
}
@@ -824,8 +824,8 @@ swfdec_action_binary (JSContext *cx, gui
rval = cx->fp->sp[-1];
lval = cx->fp->sp[-2];
if (((SwfdecScript *) cx->fp->swf)->version < 7) {
- l = swfdec_action_to_number (cx, lval);
- r = swfdec_action_to_number (cx, rval);
+ l = swfdec_value_to_number (cx, lval);
+ r = swfdec_value_to_number (cx, rval);
} else {
if (!swfdec_va...
2014 Sep 01
2
[LLVMdev] Instrumenting Various Types Using Single Instrumentation Function
...function say void recordVarInputValues(int num, ...) . So, I
have created a Union type in Tracing.cpp, which I link with my benchmark
module at compile time. These steps are similar to giri instrumentation
https://github.com/liuml07/giri
union NumericType
{
int iValue;
long lValue;
double dValue;
...
};
Now, I would like to convert all the llvm Values, required by
recordVarInputValues function, to be of NumericType. So that a variable
length list of NumerricType values can be passed to my instrumentation
function. This way I will not have to create different...
2014 Sep 25
0
[PATCH] nv50/ir: avoid deleting pseudo instructions too early
...n/nv50_ir_ra.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
@@ -25,6 +25,7 @@
#include <stack>
#include <limits>
+#include <tr1/unordered_set>
namespace nv50_ir {
@@ -1547,6 +1548,11 @@ SpillCodeInserter::run(const std::list<ValuePair>& lst)
LValue *lval = it->first->asLValue();
Symbol *mem = it->second ? it->second->asSym() : NULL;
+ // Keep track of which instructions to delete later. Deleting them
+ // inside the loop is unsafe since a single instruction may have
+ // multiple destinations that all...
2011 Apr 23
0
[LLVMdev] copy instructions
...ue *result = new TempValue; // get unique temporary
>> emit(result->str() + " add " + l->str() + ", " r-str());
>> return result;
>> }
>>
>> Value *assignExpression::codeGen() {
>> Value *rval = rvalue->codeGen();
>> Value *lval = new NameValue(ident);
>> emit(lval->str() + " = " + rval->str()); // emit (silly) copy
>> instruction
>> return lval;
>> }
>>
>> What I have suggested to my students is to omit the (non-existent) copy
>> instruction
>> and use t...
2007 Jan 25
0
Branch 'interpreter' - 28 commits - configure.ac libswfdec/js libswfdec/swfdec_buffer.c libswfdec/swfdec_edittext_movie.c libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_player.c
...defined2-7.swf
13/44 failures
diff --git a/libswfdec/swfdec_script.c b/libswfdec/swfdec_script.c
index 3bbd168..104af78 100644
--- a/libswfdec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -540,8 +540,15 @@ swfdec_action_binary (JSContext *cx, gui
rval = cx->fp->sp[-1];
lval = cx->fp->sp[-2];
- l = swfdec_action_to_number (cx, lval);
- r = swfdec_action_to_number (cx, rval);
+ if (((SwfdecScript *) cx->fp->swf)->version < 7) {
+ l = swfdec_action_to_number (cx, lval);
+ r = swfdec_action_to_number (cx, rval);
+ } else {
+ if (!JS_ValueToN...
2008 Aug 01
0
Unexpected nls behaviour
...atch
xy <- sortedXyData(mCall[["Batch"]], LHS, data)
Batch <- data[[as.character(mCall[["Batch"]])]]
# check Batch is successive integers starting at 1
if ((min(xy$x) !=1) | (any(diff(xy$x)!=1))) stop(
"Batch is not a successive integers sequence")
Lval <- list(xy$y)
names(Lval) <- mCall["Coeffs"]
Lval
}
)
DF <- data.frame(A=c(0.9, 1.1, 1.9, 2.0, 2.1, 2.9, 3.0),
Batch=c(1,1,2,2,2,3,3))
Aform <- formula(A~SSbatch(Batch,cA))
nls(Aform, DF, start=getInitial(Aform, DF))
nls(Aform, DF)
------------------------------------
Don...
2007 May 29
0
Branch 'as' - 6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_js_xml.c libswfdec/swfdec_tag.c player/swfplay.c
...nd = l == r;
+ if (isnan (l) && isnan (r))
+ cond = ltype == rtype;
+ else
+ cond = l == r;
out:
swfdec_as_stack_pop (cx->frame->stack);
@@ -1138,7 +1141,11 @@ swfdec_action_equals2 (SwfdecAsContext *
/* else compare as numbers */
l = swfdec_as_value_to_number (cx, lval);
r = swfdec_as_value_to_number (cx, rval);
- cond = l == r;
+
+ if (isnan (l) && isnan (r))
+ cond = ltype == rtype;
+ else
+ cond = l == r;
out:
swfdec_as_stack_pop (cx->frame->stack);
@@ -1166,7 +1173,12 @@ swfdec_action_strict_equals (SwfdecAsCon
cond = SWFDEC_...