Commit 68a7736b authored by Manos Koukoutos's avatar Manos Koukoutos Committed by V8 LUCI CQ

[snapshot] Rename embedded*.S files to .asm

We want to use llvm-ml to assemble files on Windows, but it only
recognizes .asm files as input files. See
https://chromium-review.googlesource.com/c/v8/v8/+/3668287.

Change-Id: I34ff6d2693a34653c8e22a7c2d093853505cd455
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3672420Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80782}
parent 78a5d6f5
......@@ -3240,11 +3240,11 @@ filegroup(
"src/init/setup-isolate-deserialize.cc",
] + select({
"@v8//bazel/config:v8_target_arm": [
"google3/snapshots/arm/noicu/embedded.S",
"google3/snapshots/arm/noicu/embedded.asm",
"google3/snapshots/arm/noicu/snapshot.cc",
],
"@v8//bazel/config:v8_target_ia32": [
"google3/snapshots/ia32/noicu/embedded.S",
"google3/snapshots/ia32/noicu/embedded.asm",
"google3/snapshots/ia32/noicu/snapshot.cc",
],
"//conditions:default": [":noicu/generated_snapshot_files"],
......@@ -3257,11 +3257,11 @@ filegroup(
"src/init/setup-isolate-deserialize.cc",
] + select({
"@v8//bazel/config:v8_target_arm": [
"google3/snapshots/arm/icu/embedded.S",
"google3/snapshots/arm/icu/embedded.asm",
"google3/snapshots/arm/icu/snapshot.cc",
],
"@v8//bazel/config:v8_target_ia32": [
"google3/snapshots/ia32/icu/embedded.S",
"google3/snapshots/ia32/icu/embedded.asm",
"google3/snapshots/ia32/icu/snapshot.cc",
],
"//conditions:default": [":icu/generated_snapshot_files"],
......
......@@ -1527,7 +1527,7 @@ config("v8_gcov_coverage_ldflags") {
# Actions
#
# Only for Windows clang builds. Converts the embedded.S file produced by
# Only for Windows clang builds. Converts the embedded.asm file produced by
# mksnapshot into an embedded.cc file with corresponding inline assembly.
template("asm_to_inline_asm") {
name = target_name
......@@ -1544,11 +1544,11 @@ template("asm_to_inline_asm") {
script = "tools/snapshot/asm_to_inline_asm.py"
deps = [ ":run_mksnapshot_" + name ]
sources = [ "$target_gen_dir/embedded${suffix}.S" ]
sources = [ "$target_gen_dir/embedded${suffix}.asm" ]
outputs = [ "$target_gen_dir/embedded${suffix}.cc" ]
args = invoker.args
args += [
rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir),
rebase_path("$target_gen_dir/embedded${suffix}.asm", root_build_dir),
rebase_path("$target_gen_dir/embedded${suffix}.cc", root_build_dir),
]
}
......@@ -2086,7 +2086,7 @@ action("generate_bytecode_builtins_list") {
# Template to generate different V8 snapshots based on different runtime flags.
# Can be invoked with run_mksnapshot(<name>). The target will resolve to
# run_mksnapshot_<name>. If <name> is "default", no file suffixes will be used.
# Otherwise files are suffixed, e.g. embedded_<name>.S and
# Otherwise files are suffixed, e.g. embedded_<name>.asm and
# snapshot_blob_<name>.bin.
#
# The template exposes the variables:
......@@ -2131,7 +2131,7 @@ template("run_mksnapshot") {
"--target_arch=$current_cpu",
"--embedded_src",
rebase_path("$target_gen_dir/embedded${suffix}.S", root_build_dir),
rebase_path("$target_gen_dir/embedded${suffix}.asm", root_build_dir),
]
if (v8_enable_builtins_profiling) {
......@@ -2157,7 +2157,7 @@ template("run_mksnapshot") {
args += invoker.args
outputs += [ "$target_gen_dir/embedded${suffix}.S" ]
outputs += [ "$target_gen_dir/embedded${suffix}.asm" ]
if (invoker.embedded_variant != "") {
args += [
"--embedded_variant",
......@@ -2320,7 +2320,7 @@ v8_source_set("v8_snapshot") {
deps += [ ":asm_to_inline_asm_default" ]
sources += [ "$target_gen_dir/embedded.cc" ]
} else {
sources += [ "$target_gen_dir/embedded.S" ]
sources += [ "$target_gen_dir/embedded.asm" ]
}
configs = [ ":internal_config" ]
......
......@@ -409,7 +409,7 @@ v8_target_cpu_transition = transition(
def _mksnapshot(ctx):
outs = [
ctx.actions.declare_file(ctx.attr.prefix + "/snapshot.cc"),
ctx.actions.declare_file(ctx.attr.prefix + "/embedded.S"),
ctx.actions.declare_file(ctx.attr.prefix + "/embedded.asm"),
]
ctx.actions.run(
outputs = outs,
......
......@@ -23,7 +23,7 @@
namespace v8 {
namespace internal {
// Generates the embedded.S file which is later compiled into the final v8
// Generates the embedded.asm file which is later compiled into the final v8
// binary. Its contents are exported through two symbols:
//
// v8_<variant>_embedded_blob_ (intptr_t):
......
......@@ -45,7 +45,7 @@ enum class EmbeddedTargetArch {
};
// The platform-dependent logic for emitting assembly code for the generated
// embedded.S file.
// embedded.asm file.
class PlatformEmbeddedFileWriterBase {
public:
virtual ~PlatformEmbeddedFileWriterBase() = default;
......
......@@ -694,7 +694,7 @@ DataDirective PlatformEmbeddedFileWriterWin::ByteChunkDataDirective() const {
#if defined(V8_COMPILER_IS_MSVC)
// Windows MASM doesn't have an .octa directive, use QWORDs instead.
// Note: MASM *really* does not like large data streams. It takes over 5
// minutes to assemble the ~350K lines of embedded.S produced when using
// minutes to assemble the ~350K lines of embedded.asm produced when using
// BYTE directives in a debug build. QWORD produces roughly 120KLOC and
// reduces assembly time to ~40 seconds. Still terrible, but much better
// than before. See also: https://crbug.com/v8/8475.
......
......@@ -7,7 +7,7 @@
'''
Converts a given file in clang assembly syntax to a corresponding
representation in inline assembly. Specifically, this is used to convert
embedded.S to embedded.cc for Windows clang builds.
embedded.asm to embedded.cc for Windows clang builds.
'''
import argparse
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment