daily update on 20250220 by nitload youmu, building AST generator, correct type naming

This commit is contained in:
Nitload
2025-02-21 08:11:26 +08:00
parent ccef0de6f6
commit 83bde12d22
98 changed files with 4182 additions and 1855 deletions
+7 -6
View File
@@ -2,9 +2,10 @@
#include "gl.h"
#include "glfw3.h"
#include <stdio.h>
#include <string.h>
GladGLContext *currentContext;
extern char infolog[512] = { 0 };
extern char infolog[512];
SSCAPI int SSCDECL glCheckShaderStat(GladGLContext *context, uint64_t shaderHandle, int key,
char **logRef)
@@ -30,12 +31,12 @@ SSCAPI GLFWglproc SSCDECL loadGlfuncDefault(char *procName)
{
void *ret = glfwGetProcAddress(procName);
// printf("%llu\n", (uint64_t)ret);
if (ret = NULL) {
*infolog = "Failed to load OpenGL api:";
if (ret == NULL) {
strcpy_s(infolog,30, "Failed to load OpenGL api:");
for (size_t i = 0; i < sizeof(procName); i++) {
infolog[30 + i] = procName[i];
}
printf("%s\n", infolog);
//printf("%s\n", infolog);
}
return (GLFWglproc)ret;
}
@@ -67,8 +68,8 @@ SSCAPI void SSCDECL unloadImageData(Image *out)
free(out->pixelPtr);
}
char *_cdecl readLog()
char *SSCDECL readLog()
{
infolog[511] = '\0';
return &infolog;
return infolog;
}
+1 -1
View File
@@ -1,6 +1,6 @@
#include "StgSharpC.h"
#include "ssc_intrinsic.h"
#include <stdio.h>
#ifdef _MSC_VER
#include <intrin.h>
+4 -5
View File
@@ -1,20 +1,19 @@
#include "StgSharpC.h"
#include "ssc_intrinsic.h"
int index_pair_sse(short const *str, uint32_t target, int length)
{
int index = 0, result = 0, size = length, end = size - 8;
__m128i s_even = { .m128i_u32 = {
__m128i s = {
target,
target,
target,
target,
} };
};
__m128i vec, com;
while (index < end) {
vec = _mm_loadu_epi32(str + index);
com = _mm_cmpeq_epi16(vec, s_even);
com = _mm_cmpeq_epi16(vec, s);
result = _mm_movemask_epi8(com);
if (result) {
for (size_t i = 0; i < 7; i++) {
@@ -29,7 +28,7 @@ int index_pair_sse(short const *str, uint32_t target, int length)
}
index += 1;
vec = _mm_loadu_epi32(str + index);
com = _mm_cmpeq_epi16(vec, s_even);
com = _mm_cmpeq_epi16(vec, s);
result = _mm_movemask_epi8(com);
if (result) {
for (size_t i = 0; i < 7; i++) {