1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-15 12:34:05 +02:00

m1/perf/: a bunch of bug fixes all over the place

This commit is contained in:
Werner Almesberger 2011-09-18 10:14:12 -03:00
parent 065ad19d99
commit c02c02903d
3 changed files with 7 additions and 7 deletions

View File

@ -1,8 +1,8 @@
#!/usr/bin/perl #!/usr/bin/perl
#while (<>) { while (<>) {
# last if /per-vertex PFPU fragment/; last if /per-vertex PFPU fragment/;
#} }
$i = 0; $i = 0;
while (<>) { while (<>) {
@ -17,8 +17,8 @@ while (<>) {
$a = $reg{$a} if defined $reg{$a}; $a = $reg{$a} if defined $reg{$a};
$b = $reg{$b} if defined $reg{$b}; $b = $reg{$b} if defined $reg{$b};
if ($op eq "IF") { if ($op eq "IF<R2>") {
$expr = "(IF $reg{002} $a $b)"; $expr = "(IF ".$reg{"R002"}." $a $b)";
} elsif ($op eq "VECTOUT") { } elsif ($op eq "VECTOUT") {
$res = "$a\n$b\n"; $res = "$a\n$b\n";
} elsif (defined $b) { } elsif (defined $b) {

View File

@ -45,7 +45,7 @@ int main(int argc, char **argv)
perror(name); perror(name);
exit(1); exit(1);
} }
got = fread(buf, sizeof(buf)-1, 1, file); got = fread(buf, 1, sizeof(buf)-1, file);
if (got < 0) { if (got < 0) {
perror(name); perror(name);
exit(1); exit(1);

View File

@ -360,7 +360,7 @@ static void init_scheduler(struct fpvm_fragment *frag)
list_init(&insn->dependants); list_init(&insn->dependants);
switch (insn->arity) { switch (insn->arity) {
case 3: case 3:
add_data_ref(insn, &insn->opb, FPVM_REG_IFB); add_data_ref(insn, &insn->cond, FPVM_REG_IFB);
/* fall through */ /* fall through */
case 2: case 2:
add_data_ref(insn, &insn->opb, frag->code[i].opb); add_data_ref(insn, &insn->opb, frag->code[i].opb);