allow comments in SPR / GPR / FPR files
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 25 May 2021 13:02:38 +0000 (14:02 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 25 May 2021 13:02:51 +0000 (14:02 +0100)
media/audio/mp3/mp3_0.gpr
src/openpower/decoder/isa/pypowersim.py

index eaf8511bf534b84bbb40d56e8d25f2b287de1185..3318e6a466694a593ee0fbe676f66a8912668c66 100644 (file)
@@ -1,6 +1,9 @@
-1: 0x4000
-3: 0x100000
-4: 0x200000
-5: 0x300000
-6: 0x400000
-7: 1
+# void ff_mpadsp_apply_window_float(float *synth_buf, float *window,
+#                                  int *dither_state, float *samples,
+#                                  ptrdiff_t incr);
+1: 0x4000        # stack pointer
+3: 0x100000      # param 1: float *sunth_buf     buf
+4: 0x200000      # param 2: float *window        win
+5: 0x300000      # param 3: int *dither_state    &unused
+6: 0x400000      # param 3: float *samples       out
+7: 1             # param 5: ptr_diff_t incr      1
index 0a973541d9fa0647e5be20f0eb446a989b590883..59f21f7cb29439a2524a4786de8f822a5f945126 100644 (file)
@@ -56,6 +56,10 @@ def read_entries(fname, listqty=None):
     allints = True
     with open(fname) as f:
         for line in f.readlines():
+            # split out comments
+            if line.startswith("#"):
+                continue
+            line = line.split("#")[0]
             # split line "x : y" into ["x", "y"], remove spaces
             line = list(map(str.strip, line.strip().split(":")))
             assert len(line) == 2, "regfile line must be formatted 'x : y'"