From 1a5a86a5d4557200db20e20206bcdd7b9b2a7e55 Mon Sep 17 00:00:00 2001 From: hovertank3d Date: Sat, 18 Jan 2025 23:27:52 +0100 Subject: refactor and add /about --- templates/gen.go | 1 + templates/index.html | 18 ++++++++++++++---- templates/link.html | 1 + templates/log2.s.html | 11 ----------- templates/reset.html | 2 +- templates/source_code.html | 1 - 6 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 templates/link.html delete mode 100644 templates/log2.s.html delete mode 100644 templates/source_code.html (limited to 'templates') diff --git a/templates/gen.go b/templates/gen.go index dbbaf24..0b5f5ab 100644 --- a/templates/gen.go +++ b/templates/gen.go @@ -1,3 +1,4 @@ package templates //go:generate bash -c "cat ../log2.s | ../deps/genhl/genhl asmatt > log2.s.html" +//go:generate bash -c "cat ../about.go | ../deps/genhl/genhl > about.go.html" diff --git a/templates/index.html b/templates/index.html index 85eccab..3ae5cf4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -19,16 +19,26 @@ LZCNT - -
+ +
-

LZCNT - Count the Number of Leading Zero Bits

+

LZCNT - {{.Title}}

- {{template "log2.s.html" .}} + {{ if eq .Page "log2.s.html" }} + {{template "log2.s.html" .}} + {{ end }} + {{ if eq .Page "about.go.html"}} + {{template "about.go.html" .}} + {{ end }}
diff --git a/templates/link.html b/templates/link.html new file mode 100644 index 0000000..9a43d43 --- /dev/null +++ b/templates/link.html @@ -0,0 +1 @@ +[{{index . 0}}] \ No newline at end of file diff --git a/templates/log2.s.html b/templates/log2.s.html deleted file mode 100644 index f2fb03b..0000000 --- a/templates/log2.s.html +++ /dev/null @@ -1,11 +0,0 @@ -
    .section    .text
-    .global     log2lzcnt
-    .type       log2lzcnt, @function
-# {{template "source_code.html" .}}
-# {{template "reset.html" .}}
-log2lzcnt:              # log2lzcnt({{.Requests}});
-    lzcnt   %rdi, %rdi 
-    movq    $63,  %rax
-    sub     %rdi, %rax
-    ret                 # 2^{{.Log2lzcnt}} requests handled
-
\ No newline at end of file diff --git a/templates/reset.html b/templates/reset.html index 090b273..d6bfa7e 100644 --- a/templates/reset.html +++ b/templates/reset.html @@ -1 +1 @@ -[reset counter] \ No newline at end of file +[reset counter]
\ No newline at end of file diff --git a/templates/source_code.html b/templates/source_code.html deleted file mode 100644 index 631c649..0000000 --- a/templates/source_code.html +++ /dev/null @@ -1 +0,0 @@ -[source code] \ No newline at end of file -- cgit v1.2.3