Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Jon Boone
cmucl
Commits
ea2dae80
Commit
ea2dae80
authored
12 years ago
by
Raymond Toy
Browse files
Options
Downloads
Patches
Plain Diff
Clean up and correct some comments.
parent
5a06638f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/compiler/x86/macros.lisp
+12
-10
12 additions, 10 deletions
src/compiler/x86/macros.lisp
src/lisp/x86-assem.S
+1
-1
1 addition, 1 deletion
src/lisp/x86-assem.S
with
13 additions
and
11 deletions
src/compiler/x86/macros.lisp
+
12
−
10
View file @
ea2dae80
...
@@ -140,22 +140,25 @@
...
@@ -140,22 +140,25 @@
(
defun
inline-allocation
(
alloc-tn
size
)
(
defun
inline-allocation
(
alloc-tn
size
)
(
let
((
ok
(
gen-label
))
(
let
((
ok
(
gen-label
))
(
done
(
gen-label
)))
(
done
(
gen-label
)))
;;
;; Load the size first so that the size can be in the same
;; Load the size first so that the size can be in the same
;; register as alloc-tn.
;; register as alloc-tn.
(
load-size
alloc-tn
alloc-tn
size
)
(
load-size
alloc-tn
alloc-tn
size
)
;;
;; Try inline allocation, incrementing the
;; current-region-free-pointer by the size. If we didn't pass the
;; end of the region, then inline allocation succeeded, and we're
;; done.
(
inst
add
alloc-tn
(
inst
add
alloc-tn
(
make-symbol-value-ea
'*current-region-free-pointer*
))
(
make-symbol-value-ea
'*current-region-free-pointer*
))
(
inst
cmp
alloc-tn
(
inst
cmp
alloc-tn
(
make-symbol-value-ea
'*current-region-end-addr*
))
(
make-symbol-value-ea
'*current-region-end-addr*
))
(
inst
jmp
:be
OK
)
(
inst
jmp
:be
OK
)
;; Inline allocation didn't work so we need to call alloc, carefully.
;; Inline allocation didn't work so we need to call alloc,
;; carefully. Need to recompute the size because we can't just
;; Recompute the size. Can't just reload size because it might
;; reload size because it might have already been destroyed if
;; have already been destroyed if size = alloc-tn (which does
;; size = alloc-tn (which does happen).
;; happen).
(
inst
sub
alloc-tn
(
make-symbol-value-ea
'*current-region-free-pointer*
))
(
inst
sub
alloc-tn
(
make-symbol-value-ea
'*current-region-free-pointer*
))
(
case
(
tn-offset
alloc-tn
)
(
case
(
tn-offset
alloc-tn
)
(
#.
eax-offset
(
#.
eax-offset
...
@@ -169,7 +172,7 @@
...
@@ -169,7 +172,7 @@
(
inst
call
(
make-fixup
(
extern-alien-name
#-
sse2
"alloc_overflow_x87"
(
inst
call
(
make-fixup
(
extern-alien-name
#-
sse2
"alloc_overflow_x87"
#+
sse2
"alloc_overflow_sse2"
)
#+
sse2
"alloc_overflow_sse2"
)
:foreign
))
:foreign
))
(
inst
mov
alloc-tn
eax-tn
)
; Save
allocated address in alloc-tn
(
inst
mov
alloc-tn
eax-tn
)
; Put
allocated address in alloc-tn
(
inst
pop
eax-tn
)
; Restore old value of eax
(
inst
pop
eax-tn
)
; Restore old value of eax
(
inst
jmp
done
)))
(
inst
jmp
done
)))
...
@@ -181,8 +184,7 @@
...
@@ -181,8 +184,7 @@
(
values
))
(
values
))
(
defun
not-inline-allocation
(
alloc-tn
size
)
(
defun
not-inline-allocation
(
alloc-tn
size
)
;; C call to allocate via dispatch routines. Each destination has a
;; C call to allocate. The size may be a register or a constant.
;; special entry point. The size may be a register or a constant.
(
load-size
alloc-tn
alloc-tn
size
)
(
load-size
alloc-tn
alloc-tn
size
)
(
case
(
tn-offset
alloc-tn
)
(
case
(
tn-offset
alloc-tn
)
(
#.
eax-offset
(
#.
eax-offset
...
...
This diff is collapsed.
Click to expand it.
src/lisp/x86-assem.S
+
1
−
1
View file @
ea2dae80
...
@@ -484,7 +484,7 @@ FUNCDEF(alloc_overflow_sse2)
...
@@ -484,7 +484,7 @@ FUNCDEF(alloc_overflow_sse2)
movl
%
ecx
,
8
(%
esp
)
#
Save
ecx
and
edx
registers
movl
%
ecx
,
8
(%
esp
)
#
Save
ecx
and
edx
registers
movl
%
edx
,
4
(%
esp
)
movl
%
edx
,
4
(%
esp
)
stmxcsr
12
(%
esp
)
#
Save
MXCSR
stmxcsr
12
(%
esp
)
#
Save
MXCSR
/
*
Clear
the
exceptions
that
might
occurred
*/
/
*
Clear
the
exceptions
that
might
have
occurred
*/
movl
12
(%
esp
),
%
edx
movl
12
(%
esp
),
%
edx
and
$
-
64
,
%
edx
#
Clear
the
exceptions
and
$
-
64
,
%
edx
#
Clear
the
exceptions
movl
%
edx
,
16
(%
esp
)
movl
%
edx
,
16
(%
esp
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment