Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Algol68
Analysis
Android Java
Android Kotlin
Assembly
C
C3
Carbon
C with Coccinelle
C++ with Coccinelle
C++ (Circle)
CIRCT
Clean
CMake
CMakeScript
COBOL
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Elixir
Erlang
Fortran
F#
GLSL
Go
Haskell
HLSL
Hook
Hylo
IL
ispc
Java
Julia
Kotlin
LLVM IR
LLVM MIR
Modula-2
Mojo
Nim
Numba
Nix
Objective-C
Objective-C++
OCaml
Odin
OpenCL C
Pascal
Pony
PTX
Python
Racket
Raku
Ruby
Rust
Sail
Snowball
Scala
Slang
Solidity
Spice
SPIR-V
Swift
LLVM TableGen
Toit
TypeScript Native
V
Vala
Visual Basic
Vyper
WASM
Zig
Javascript
GIMPLE
Ygen
sway
pascal source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
madpascal trunk
x86-64 fpc (trunk)
x86-64 fpc 2.6.0
x86-64 fpc 2.6.2
x86-64 fpc 2.6.4
x86-64 fpc 3.0.2
x86-64 fpc 3.0.4
x86-64 fpc 3.2.0
x86-64 fpc 3.2.2
Options
Source code
{$mode objfpc} unit output; interface procedure Naive(); implementation procedure RotA(i: integer); inline; begin asm Nop end; end; procedure RotB(i: integer); inline; begin asm Nop end; end; procedure RotC(i: integer); inline; begin asm Nop end; end; procedure RotD(i: integer); inline; begin asm Nop end; end; procedure RotE(i: integer); inline; begin asm Nop end; end; procedure RotF(i: integer); inline; begin asm Nop end; end; const max = 10000; procedure Naive(); var i: Integer; begin for i := 0 to max do begin case i mod 48 of 0, 2, 6, 8: begin RotA(i); end; 1, 3, 7, 9, 11: begin RotB(i); end; 4, 5, 10, 12: begin RotC(i); end; 2 + 12, 6 + 12, 8 + 12: begin RotD(i); end; 1 + 12, 3 + 12, 7 + 12, 9 + 12, 11 + 12: begin RotE(i); end; 4 + 12, 5 + 12, 10 + 12, 12 + 12: begin RotF(i); end; 2 + 24, 6 + 24, 8 + 24: begin RotD(i); end; 1 + 24, 3 + 24, 7 + 24, 9 + 24, 11 + 24: begin RotE(i); end; 4 + 24, 5 + 24, 10 + 24, 24 + 24: begin RotF(i); end; 2 + 36, 6 + 36, 8 + 36: begin RotD(i); end; 1 + 36, 3 + 36, 7 + 36, 9 + 36, 11 + 36: begin RotE(i); end; 4 + 36, 5 + 36, 10 + 36, 36 + 36: begin RotF(i); end; end; end; end; end.
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
CE on Bluesky
About the author
Statistics
Changelog
Version tree