... |
... |
@@ -1141,12 +1141,17 @@ default-value-8 |
1141
|
1141
|
;; Allocate the space on the stack.
|
1142
|
1142
|
(cond ((zerop fixed)
|
1143
|
1143
|
(inst cmp nargs-tn)
|
|
1144
|
+ ;; Add nargs-tn to csp-tn twice to get the right address
|
|
1145
|
+ ;; because fixnum values need to be multiplied by two to
|
|
1146
|
+ ;; get the right word address/offset.
|
|
1147
|
+ (inst add csp-tn csp-tn nargs-tn)
|
1144
|
1148
|
(inst b :eq done)
|
1145
|
1149
|
(inst add csp-tn csp-tn nargs-tn))
|
1146
|
1150
|
(t
|
1147
|
1151
|
(inst subcc count nargs-tn (fixnumize fixed))
|
1148
|
1152
|
(inst b :le done)
|
1149
|
1153
|
(inst nop)
|
|
1154
|
+ (inst add csp-tn csp-tn count)
|
1150
|
1155
|
(inst add csp-tn csp-tn count)))
|
1151
|
1156
|
(when (< fixed register-arg-count)
|
1152
|
1157
|
;; We must stop when we run out of stack args, not when we run out of
|
... |
... |
@@ -1158,6 +1163,7 @@ default-value-8 |
1158
|
1163
|
(move dst csp-tn)
|
1159
|
1164
|
;; Initialize src to be end of args.
|
1160
|
1165
|
(inst add src cfp-tn nargs-tn)
|
|
1166
|
+ (inst add src cfp-tn nargs-tn)
|
1161
|
1167
|
|
1162
|
1168
|
(emit-label loop)
|
1163
|
1169
|
;; *--dst = *--src, --count
|
... |
... |
@@ -1271,7 +1277,9 @@ default-value-8 |
1271
|
1277
|
(:generator 5
|
1272
|
1278
|
(emit-not-implemented)
|
1273
|
1279
|
(inst sub count supplied (fixnumize fixed))
|
1274
|
|
- (inst sub context csp-tn count)))
|
|
1280
|
+ ;; Subtract count twice to get the correct word offset.
|
|
1281
|
+ (inst sub context csp-tn count)
|
|
1282
|
+ (inst sub context context count)))
|
1275
|
1283
|
|
1276
|
1284
|
|
1277
|
1285
|
;;; Signal wrong argument count error if Nargs isn't = to Count.
|