Commit 5c8eda36d6

Ahmed <111569638+0Ahmed-0@users.noreply.github.com>
2024-03-13 23:30:48
chore: Fix some typos
1 parent 400145e
lib/compiler_rt/addf3.zig
@@ -114,7 +114,7 @@ pub inline fn addf3(comptime T: type, a: T, b: T) T {
         // If a == -b, return +zero.
         if (aSignificand == 0) return @bitCast(@as(Z, 0));
 
-        // If partial cancellation occured, we need to left-shift the result
+        // If partial cancellation occurred, we need to left-shift the result
         // and adjust the exponent:
         if (aSignificand < integerBit << 3) {
             const shift = @as(i32, @intCast(@clz(aSignificand))) - @as(i32, @intCast(@clz(integerBit << 3)));
lib/compiler_rt/addo.zig
@@ -25,7 +25,7 @@ inline fn addoXi4_generic(comptime ST: type, a: ST, b: ST, overflow: *c_int) ST
     // and the sign of a+b+carry is the same as a (or equivalently b).
     // Slower routine: res = ~(a ^ b) & ((sum ^ a)
     // Faster routine: res = (sum ^ a) & (sum ^ b)
-    // Overflow occured, iff (res < 0)
+    // Overflow occurred, iff (res < 0)
     if (((sum ^ a) & (sum ^ b)) < 0)
         overflow.* = 1;
     return sum;
lib/compiler_rt/divtf3.zig
@@ -140,7 +140,7 @@ inline fn div(a: f128, b: f128) f128 {
     var reciprocal: u128 = undefined;
 
     // NOTE: This operation is equivalent to __multi3, which is not implemented
-    //       in some architechure
+    //       in some architecture
     var r64q63: u128 = undefined;
     var r64q127: u128 = undefined;
     var r64cH: u128 = undefined;
lib/compiler_rt/emutls.zig
@@ -145,7 +145,7 @@ const ObjectArray = struct {
     }
 };
 
-// Global stucture for Thread Storage.
+// Global structure for Thread Storage.
 // It provides thread-safety for on-demand storage of Thread Objects.
 const current_thread_storage = struct {
     var key: std.c.pthread_key_t = undefined;
@@ -358,7 +358,7 @@ test "__emutls_get_address with default_value" {
     try expect(y.* == 9012); // the modified storage persists
 }
 
-test "test default_value with differents sizes" {
+test "test default_value with different sizes" {
     if (!builtin.link_libc or builtin.os.tag != .openbsd) return error.SkipZigTest;
 
     const testType = struct {
lib/compiler_rt/fmod.zig
@@ -58,7 +58,7 @@ pub fn __fmodx(a: f80, b: f80) callconv(.C) f80 {
     //   - fmodx(val, NaN)
     //   - fmodx(inf, val)
     // The sign on checked values does not matter.
-    // Doing (a * b) / (a * b) procudes undefined results
+    // Doing (a * b) / (a * b) produces undefined results
     // because the three cases always produce undefined calculations:
     //   - 0 / 0
     //   - val * NaN
@@ -163,7 +163,7 @@ pub fn fmodq(a: f128, b: f128) callconv(.C) f128 {
     //   - fmodq(val, NaN)
     //   - fmodq(inf, val)
     // The sign on checked values does not matter.
-    // Doing (a * b) / (a * b) procudes undefined results
+    // Doing (a * b) / (a * b) produces undefined results
     // because the three cases always produce undefined calculations:
     //   - 0 / 0
     //   - val * NaN
@@ -239,7 +239,7 @@ pub fn fmodq(a: f128, b: f128) callconv(.C) f128 {
     aPtr_u64[high_index] = highA;
     aPtr_u64[low_index] = lowA;
 
-    // Combine the exponent with the sign, normalize if happend to be denormalized
+    // Combine the exponent with the sign, normalize if happened to be denormalized
     if (expA <= 0) {
         aPtr_u16[exp_and_sign_index] = @as(u16, @truncate(@as(u32, @bitCast((expA +% 120))))) | signA;
         amod *= 0x1p-120;
lib/compiler_rt/mulf3_test.zig
@@ -13,7 +13,7 @@ const __muldf3 = @import("muldf3.zig").__muldf3;
 const __mulsf3 = @import("mulsf3.zig").__mulsf3;
 
 // return true if equal
-// use two 64-bit integers intead of one 128-bit integer
+// use two 64-bit integers instead of one 128-bit integer
 // because 128-bit integer constant can't be assigned directly
 fn compareResultLD(result: f128, expectedHi: u64, expectedLo: u64) bool {
     const rep: u128 = @bitCast(result);
lib/compiler_rt/rem_pio2_large.zig
@@ -174,14 +174,14 @@ const PIo2 = [_]f64{
 ///                      z    = (z-x[i])*2**24
 ///
 ///
-///      y[]     ouput result in an array of double precision numbers.
+///      y[]     output result in an array of double precision numbers.
 ///              The dimension of y[] is:
 ///                      24-bit  precision       1
 ///                      53-bit  precision       2
 ///                      64-bit  precision       2
 ///                      113-bit precision       3
 ///              The actual value is the sum of them. Thus for 113-bit
-///              precison, one may have to do something like:
+///              precision, one may have to do something like:
 ///
 ///              long double t,w,r_head, r_tail;
 ///              t = (long double)y[2] + (long double)y[1];
lib/compiler_rt/subo.zig
@@ -34,7 +34,7 @@ inline fn suboXi4_generic(comptime ST: type, a: ST, b: ST, overflow: *c_int) ST
     // and the sign of a-b-carry is opposite of a (or equivalently same as b).
     // Faster routine: res = (a ^ b) & (sum ^ a)
     // Slower routine: res = (sum^a) & ~(sum^b)
-    // Overflow occured, iff (res < 0)
+    // Overflow occurred, iff (res < 0)
     if (((a ^ b) & (sum ^ a)) < 0)
         overflow.* = 1;
     return sum;
test/standalone/stack_iterator/unwind.zig
@@ -19,7 +19,7 @@ noinline fn frame3(expected: *[4]usize, unwound: *[4]usize) void {
 }
 
 noinline fn frame2(expected: *[4]usize, unwound: *[4]usize) void {
-    // Excercise different __unwind_info / DWARF CFI encodings by forcing some registers to be restored
+    // Exercise different __unwind_info / DWARF CFI encodings by forcing some registers to be restored
     if (builtin.target.ofmt != .c) {
         switch (builtin.cpu.arch) {
             .x86 => {
tools/update_spirv_features.zig
@@ -243,7 +243,7 @@ fn gather_extensions(allocator: Allocator, spirv_registry_root: []const u8) ![]c
             if (!std.mem.endsWith(u8, ext_entry.name, ".asciidoc"))
                 continue;
 
-            // Unfortunately, some extension filenames are incorrect, so we need to look for the string in tne 'Name Strings' section.
+            // Unfortunately, some extension filenames are incorrect, so we need to look for the string in the 'Name Strings' section.
             // This has the following format:
             // ```
             // Name Strings