ubsan: bpf: left shift cannot be represented in type 'DI' (aka 'long')
[deliverable/binutils-gdb.git] / cpu / m32c.cpu
index 28d6ea5685251758b6ffd505c1d7f2fcf87fb1f3..5a38f1bd5264a574ae95c8569dc3d02fd185466b 100644 (file)
 )
 (df  f-dsp-8-s24 "24 bit signed" (all-isas) 8 24 INT
      ((value pc) (or SI
-                    (or (srl value 16) (and value #xff00))
+                    (or (and (srl value 16) #xff) (and value #xff00))
                     (sll (ext INT (trunc QI (and value #xff))) 16)))
      ((value pc) (or SI
-                    (or (srl value 16) (and value #xff00))
+                    (or (and (srl value 16) #xff) (and value #xff00))
                     (sll (ext INT (trunc QI (and value #xff))) 16)))
  )
 
 )
 (df  f-lab-8-16 "16 bit pc relative signed offset" (PCREL-ADDR SIGN-OPT all-isas) 8 16 UINT
      ((value pc) (or SI (sll (and (sub value (add pc 1)) #xff) 8)
-                    (srl (and (sub value (add pc 1)) #xffff) 8)))
-     ((value pc) (add SI (or (srl (and value #xffff) 8)
-                            (sra (sll (and value #xff) 24) 16)) (add pc 1)))
+                    (srl (and (sub value (add pc 1)) #xff00) 8)))
+     ((value pc) (add SI (sub (xor (or (srl (and value #xff00) 8)
+                                      (sll (and value #xff) 8))
+                                   #x8000)
+                              #x8000)
+                     (add pc 1)))
  )
 (df  f-lab-8-24 "24 bit absolute" (all-isas ABS-ADDR) 8 24 UINT
      ((value pc) (or SI
This page took 0.023658 seconds and 4 git commands to generate.