ARM: Fix strh sign handling.

* module/mescc/armv4/as.scm (armv4:word-r->local+n): Fix strh sign handling.
This commit is contained in:
Danny Milosavljevic 2019-05-30 12:22:49 +02:00 committed by Jan Nieuwenhuizen
parent f9a6e1aed0
commit c7bfc1de36
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 5 additions and 1 deletions

View File

@ -486,7 +486,11 @@
(let* ((n (+ (- 0 (* 4 id)) n))
(r (get-r info)))
`(,(if (< (abs n) #x80)
`((#:immediate1 ,n) ,(string-append "strh___%" r ",0x8(%ebp)"))
(if (< n 0)
`((#:immediate1 ,(abs n))
,(string-append "strh___%" r ",(%fp,-#$i8)"))
`((#:immediate1 ,n)
,(string-append "strh___%" r ",(%fp,+#$i8)")))
`(,(string-append "strh___%" r ",0x32(%ebp)") (#:immediate ,n))))))
(define (armv4:r-and info v)