<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/src/string, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[libc] Improve memcpy for ARM Cortex-M supporting unaligned accesses. (#144872)</title>
<updated>2025-06-26T08:18:02+00:00</updated>
<author>
<name>Guillaume Chatelet</name>
<email>gchatelet@google.com</email>
</author>
<published>2025-06-26T08:18:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7289b6789ef3297f8de30a9d94c7dabc6c35931e'/>
<id>7289b6789ef3297f8de30a9d94c7dabc6c35931e</id>
<content type='text'>
This implementation has been compiled with the [pigweed toolchain](https://pigweed.dev/toolchain.html) and tested on:
 - Raspberry Pi Pico 2 with the following options\
`--target=armv8m.main-none-eabi`
`-march=armv8m.main+fp+dsp`
`-mcpu=cortex-m33` 
 - Raspberry Pi Pico with the following options\
`--target=armv6m-none-eabi`
`-march=armv6m`
`-mcpu=cortex-m0+` 

They both compile down to a little bit more than 200 bytes and are between 2 and 10 times faster than byte per byte copies.

For best performance the following options can be set in the `libc/config/baremetal/arm/config.json`
```
{
  "codegen": {
    "LIBC_CONF_KEEP_FRAME_POINTER": {
      "value": false
    }
  },
  "general": {
    "LIBC_ADD_NULL_CHECKS": {
      "value": false
    }
  }
}
```</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implementation has been compiled with the [pigweed toolchain](https://pigweed.dev/toolchain.html) and tested on:
 - Raspberry Pi Pico 2 with the following options\
`--target=armv8m.main-none-eabi`
`-march=armv8m.main+fp+dsp`
`-mcpu=cortex-m33` 
 - Raspberry Pi Pico with the following options\
`--target=armv6m-none-eabi`
`-march=armv6m`
`-mcpu=cortex-m0+` 

They both compile down to a little bit more than 200 bytes and are between 2 and 10 times faster than byte per byte copies.

For best performance the following options can be set in the `libc/config/baremetal/arm/config.json`
```
{
  "codegen": {
    "LIBC_CONF_KEEP_FRAME_POINTER": {
      "value": false
    }
  },
  "general": {
    "LIBC_ADD_NULL_CHECKS": {
      "value": false
    }
  }
}
```</pre>
</div>
</content>
</entry>
<entry>
<title>Fix string_length function so that it always returns. (#144148)</title>
<updated>2025-06-13T20:07:39+00:00</updated>
<author>
<name>Amy Huang</name>
<email>akhuang@google.com</email>
</author>
<published>2025-06-13T20:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c42912b8c96ff1130437e47c163aeb5c1191fe5d'/>
<id>c42912b8c96ff1130437e47c163aeb5c1191fe5d</id>
<content type='text'>
Previously setting LIBC_COPT_STRING_UNSAFE_WIDE_READ would cause a build
error because there is a path in the ifdef that doesn't return anything.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously setting LIBC_COPT_STRING_UNSAFE_WIDE_READ would cause a build
error because there is a path in the ifdef that doesn't return anything.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Independent strcat/strncat/stpcpy (#142643)</title>
<updated>2025-06-12T22:57:58+00:00</updated>
<author>
<name>Michael Jones</name>
<email>michaelrj@google.com</email>
</author>
<published>2025-06-12T22:57:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=28c14d475fbd16d07db88c8d12edddfe9cc226ab'/>
<id>28c14d475fbd16d07db88c8d12edddfe9cc226ab</id>
<content type='text'>
The previous implementations called other entrypoints. This patch fixes
strcat, strncat, and stpcpy to be properly independent.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous implementations called other entrypoints. This patch fixes
strcat, strncat, and stpcpy to be properly independent.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Move libc_errno.h to libc/src/__support and make LIBC_ERRNO_MODE_SYSTEM to be header-only. (#143187)</title>
<updated>2025-06-11T20:25:27+00:00</updated>
<author>
<name>lntue</name>
<email>lntue@google.com</email>
</author>
<published>2025-06-11T20:25:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d87eea35fac5a34a841c637db8908128409a184e'/>
<id>d87eea35fac5a34a841c637db8908128409a184e</id>
<content type='text'>
This is the first step in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the first step in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] clean up string_utils memory functions (#143031)</title>
<updated>2025-06-06T18:16:54+00:00</updated>
<author>
<name>Michael Jones</name>
<email>michaelrj@google.com</email>
</author>
<published>2025-06-06T18:16:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=59f88a8e929b9eff97f2c37f835d9fe70d1dd0c7'/>
<id>59f88a8e929b9eff97f2c37f835d9fe70d1dd0c7</id>
<content type='text'>
The string_utils.h file previously included both memcpy and bzero. There
were no uses of bzero, and only one use of memcpy which was replaced
with __builtin_memcpy.

Also fix strsep which was broken by this change, fix a useless assert of
"sizeof(char) == sizeof(cpp::byte)", and update the bazel.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The string_utils.h file previously included both memcpy and bzero. There
were no uses of bzero, and only one use of memcpy which was replaced
with __builtin_memcpy.

Also fix strsep which was broken by this change, fix a useless assert of
"sizeof(char) == sizeof(cpp::byte)", and update the bazel.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Correct x86_64 architecture for string(s) tests. (#143150)</title>
<updated>2025-06-06T15:18:55+00:00</updated>
<author>
<name>lntue</name>
<email>lntue@google.com</email>
</author>
<published>2025-06-06T15:18:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=891a0abfc2e619400065aee471169c01ca7ebf25'/>
<id>891a0abfc2e619400065aee471169c01ca7ebf25</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Expand usage of libc null checks. (#116262)</title>
<updated>2025-06-04T17:08:27+00:00</updated>
<author>
<name>Aly ElAshram</name>
<email>71949028+AlyElashram@users.noreply.github.com</email>
</author>
<published>2025-06-04T17:08:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ff844df719d7226a46b8cb0d99aef9480cced247'/>
<id>ff844df719d7226a46b8cb0d99aef9480cced247</id>
<content type='text'>
Fixes #111546

---------

Co-authored-by: alyyelashram &lt;150528548+alyyelashram@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #111546

---------

Co-authored-by: alyyelashram &lt;150528548+alyyelashram@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Add support for string/memory_utils functions for AArch64 without HW FP/SIMD (#137592)</title>
<updated>2025-05-02T11:36:00+00:00</updated>
<author>
<name>William</name>
<email>113542065+saturn691@users.noreply.github.com</email>
</author>
<published>2025-05-02T11:36:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=da3022577e1f277999922acaef9be169c20dfd48'/>
<id>da3022577e1f277999922acaef9be169c20dfd48</id>
<content type='text'>
Add conditional compilation to add support for AArch64 without vector
registers and/or hardware FPUs by using the generic implementation.

**Context:**

A few functions were hard-coded to use vector registers/hardware FPUs.
This meant that libc would not compile on architectures that did not
support these features. This fix falls back on the generic
implementation if a feature is not supported.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add conditional compilation to add support for AArch64 without vector
registers and/or hardware FPUs by using the generic implementation.

**Context:**

A few functions were hard-coded to use vector registers/hardware FPUs.
This meant that libc would not compile on architectures that did not
support these features. This fix falls back on the generic
implementation if a feature is not supported.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Fix memmove macros for unreocognized targets</title>
<updated>2025-03-14T15:25:42+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-03-14T15:25:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fdb4b89bc0e52ef769ee8ac4d40c0c7b5b62db25'/>
<id>fdb4b89bc0e52ef769ee8ac4d40c0c7b5b62db25</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Default to `byte_per_byte` instead of erroring (#131340)</title>
<updated>2025-03-14T15:10:53+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-03-14T15:10:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e8117026a9796fa3f60b61073c18c3467a037bee'/>
<id>e8117026a9796fa3f60b61073c18c3467a037bee</id>
<content type='text'>
Summary:
Right now a lot of the memory functions error if we don't have specific
handling for them. This is weird because we have a generic
implementation that should just be used whenever someone hasn't written
a more optimized version. This allows us to use the `libc` headers with
more architectures from the `shared/` directory without worrying about
it breaking.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Right now a lot of the memory functions error if we don't have specific
handling for them. This is weird because we have a generic
implementation that should just be used whenever someone hasn't written
a more optimized version. This allows us to use the `libc` headers with
more architectures from the `shared/` directory without worrying about
it breaking.</pre>
</div>
</content>
</entry>
</feed>
