Skip to content

Commit

Permalink
Minor formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanLamansky committed Dec 27, 2024
1 parent 15baea6 commit 6da78e1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions WebAssembly/Instructions/Int32CountLeadingZeroes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ internal sealed override void Compile(CompilationContext context)
[ typeof(uint)
]);

//All modern CPUs have a fast instruction specifically for this process, but there's no way to use it from .NET.
//This algorithm is from https://stackoverflow.com/questions/10439242/count-leading-zeroes-in-an-int32
var il = result.GetILGenerator();
//All modern CPUs have a fast instruction specifically for this process, but there's no way to use it from .NET.
//This algorithm is from https://stackoverflow.com/questions/10439242/count-leading-zeroes-in-an-int32
var il = result.GetILGenerator();
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldc_I4_1);
Expand Down Expand Up @@ -91,7 +91,7 @@ [ typeof(uint)

return result;
}
]);
]);
#endif
}
}
6 changes: 3 additions & 3 deletions WebAssembly/Instructions/Int32CountTrailingZeroes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ internal sealed override void Compile(CompilationContext context)
[ typeof(uint)
]);

//All modern CPUs have a fast instruction specifically for this process, but there's no way to use it from .NET.
//Based on the algorithm found here: http://aggregate.org/MAGIC/#Trailing%20Zero%20Count
var il = result.GetILGenerator();
//All modern CPUs have a fast instruction specifically for this process, but there's no way to use it from .NET.
//Based on the algorithm found here: http://aggregate.org/MAGIC/#Trailing%20Zero%20Count
var il = result.GetILGenerator();
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Neg);
Expand Down
6 changes: 3 additions & 3 deletions WebAssembly/Instructions/Int64CountLeadingZeroes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ internal sealed override void Compile(CompilationContext context)
[ typeof(ulong)
]);

//All modern CPUs have a fast instruction specifically for this process, but there's no way to use it from .NET.
//This algorithm is extended from https://stackoverflow.com/questions/10439242/count-leading-zeroes-in-an-int32
var il = result.GetILGenerator();
//All modern CPUs have a fast instruction specifically for this process, but there's no way to use it from .NET.
//This algorithm is extended from https://stackoverflow.com/questions/10439242/count-leading-zeroes-in-an-int32
var il = result.GetILGenerator();
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldc_I4_1);
Expand Down
6 changes: 3 additions & 3 deletions WebAssembly/Instructions/Int64CountTrailingZeroes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ internal sealed override void Compile(CompilationContext context)
[ typeof(ulong)
]);

//All modern CPUs have a fast instruction specifically for this process, but there's no way to use it from .NET.
//Based on the algorithm found here: http://aggregate.org/MAGIC/#Trailing%20Zero%20Count
var il = result.GetILGenerator();
//All modern CPUs have a fast instruction specifically for this process, but there's no way to use it from .NET.
//Based on the algorithm found here: http://aggregate.org/MAGIC/#Trailing%20Zero%20Count
var il = result.GetILGenerator();
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Neg);
Expand Down

0 comments on commit 6da78e1

Please sign in to comment.