Le 20/02/2017 à 13:49, Peter Maydell a écrit : > On 20 February 2017 at 12:41, Laurent Vivier <laur...@vivier.eu> wrote: >> I have some problems with risugen since some functions have been moved >> to common: >> >> $ ./risugen --numinsns 10000 --pattern ABCD m68k.risu ABCD.out >> Generating code using patterns: ABCD M68000... >> Syntax error detected evaluating ABCD M68000 constraints string: >> ] >> { write_movb_di($Dx, rand(10) | (rand(10) << >> 4)); write_movb_di($Dy, rand(10) | (rand(10) << >> 4)); 1; } >> Undefined subroutine &risugen_common::write_movb_di called at (eval 5) >> line 1. >> >> If I add "risugen_m68k::" to the function name, it works. But is there >> better solution to fix that instead of updating all the calls in >> m68k.risu for functions found in risugen_m68k.pm? > > Oops, that was unintended. We definitely don't want to require > decorating all the function calls in the .risu files. Reverting > commit 6a3647ae8918 should fix this, but I'll see if there's > a way to avoid the code duplication without the problem with > evaluation happening in the "wrong" module scope.
Reverting 6a3647ae8918 actually fixes the problem. Thanks, Laurent