aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/Asmexpand.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-10-01 13:28:14 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-10-01 13:28:14 +0200
commit36892f59ced6dd06d6a9cfc6e8af49db8721dd65 (patch)
tree8cfd3d62516762266274dd6911256c51f4996c68 /powerpc/Asmexpand.ml
parent7483a40054d5b54484317e8d252d0820d0e282e2 (diff)
downloadcompcert-kvx-36892f59ced6dd06d6a9cfc6e8af49db8721dd65.tar.gz
compcert-kvx-36892f59ced6dd06d6a9cfc6e8af49db8721dd65.zip
Do not move the line directives.
Diffstat (limited to 'powerpc/Asmexpand.ml')
-rw-r--r--powerpc/Asmexpand.ml14
1 files changed, 9 insertions, 5 deletions
diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml
index 5a365123..efd6cc0d 100644
--- a/powerpc/Asmexpand.ml
+++ b/powerpc/Asmexpand.ml
@@ -743,12 +743,16 @@ let expand_instruction id l =
end
| i::rest -> expand_instruction_simple i; aux None scopes rest in
(* We need to move all closing debug annotations before the last real statement *)
- let rec move_debug acc = function
- | (Pbuiltin(EF_debug (kind,txt,_x),args,_) as i)::rest ->
- move_debug (i::acc) rest (* Move the debug annotations forward *)
- | b::rest -> List.rev (b::(List.rev acc)@rest) (* We found the first non debug location *)
+ let rec move_debug acc bcc = function
+ | (Pbuiltin(EF_debug (kind,_,_),_,_) as i)::rest ->
+ let kind = (P.to_int kind) in
+ if kind = 1 then
+ move_debug acc (i::bcc) rest (* Do not move debug line *)
+ else
+ move_debug (i::acc) bcc rest (* Move the debug annotations forward *)
+ | b::rest -> List.rev ((List.rev (b::bcc)@List.rev acc)@rest) (* We found the first non debug location *)
| [] -> List.rev acc (* This actually can never happen *) in
- aux None [] (move_debug [] (List.rev l))
+ aux None [] (move_debug [] [] (List.rev l))
let expand_function id fn =