Revert "mescc: Make globals at least reg-size."

This reverts commit 30544316c35ed4a2472f2029beb27e007d913792.
This commit is contained in:
Jan Nieuwenhuizen 2018-10-06 15:57:52 +02:00
parent b456a32cf0
commit 3584f45056
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -2151,8 +2151,7 @@
(define (global->info type name o init info)
(let* ((rank (->rank type))
(size (->size type info))
(reg-size (->size "*" info))
(data (cond ((not init) (string->list (make-string (max size reg-size) #\nul)))
(data (cond ((not init) (string->list (make-string size #\nul)))
((c-array? type)
(let* ((string (array-init->string init))
(size (or (and string (max size (1+ (string-length string))))
@ -2165,7 +2164,7 @@
(append data (string->list (make-string (max 0 (- size (length data))) #\nul)))))
(else
(let ((data (init->data type init info)))
(append data (string->list (make-string (max 0 (- (max size reg-size) (length data))) #\nul)))))))
(append data (string->list (make-string (max 0 (- size (length data))) #\nul)))))))
(global (make-global-entry name type data)))
(clone info #:globals (append (.globals info) (list global)))))