Advertisement
Guest User

Untitled

a guest
Sep 11th, 2022
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.89 KB | None | 0 0
  1.      def spec(self, insn, record):
  2.          def merge(vector, value, span, spec, spec_span):
  3.              bits = (len(span) + len(spec_span))
  4. @@ -6,14 +6,14 @@
  5.              spec = _SelectableInt(value=spec.value, bits=bits)
  6.              # this is silly these should be in a general base class,
  7.              # settable by constructor
  8. -            vshift = 2
  9. -            sshift = 5
  10. -            spshft = 0
  11. +            vshift = 4
  12. +            sshift = 3
  13. +            spshft = 2
  14.              if vector:
  15.                  value = ((value << vshift) | (spec<<spshft))
  16. -                span = (span + spec_span)
  17. +                span = (span[0:3] + spec_span + ('{0}', '{0}') + span[3:5])
  18.              else:
  19.                  value = ((spec << sshift) | value)
  20. -                span = (spec_span + span)
  21. +                span = (('{0}', '{0}') + spec_span + span)
  22.  
  23.              return (value, span)
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement