Remove bn_div_words from bn-586.pl

This function is unused. While there is a bn_div_words symbol, it's
static and we never actually use the assembly-defined one.

Not using it is potentially a missed optimization, but only for 32-bit
x86 on MSVC because for GCC/Clang we have inline assembly. (It is hard
for the compiler to emit the instruction itself because it cannot prove
that the division fits.)

Change-Id: Ia7ecd28f26143521343dd516a07eb3adf9c4378e
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/77627
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/crypto/fipsmodule/bn/asm/bn-586.pl b/crypto/fipsmodule/bn/asm/bn-586.pl
index 7e3decf..fa7eb12 100644
--- a/crypto/fipsmodule/bn/asm/bn-586.pl
+++ b/crypto/fipsmodule/bn/asm/bn-586.pl
@@ -28,7 +28,6 @@
 &bn_mul_add_words("bn_mul_add_words");
 &bn_mul_words("bn_mul_words");
 &bn_sqr_words("bn_sqr_words");
-&bn_div_words("bn_div_words");
 &bn_add_words("bn_add_words");
 &bn_sub_words("bn_sub_words");
 
@@ -205,19 +204,6 @@
 	&function_end($name);
 	}
 
-sub bn_div_words
-	{
-	local($name)=@_;
-
-	&function_begin_B($name,"");
-	&mov("edx",&wparam(0));	#
-	&mov("eax",&wparam(1));	#
-	&mov("ecx",&wparam(2));	#
-	&div("ecx");
-	&ret();
-	&function_end_B($name);
-	}
-
 sub bn_add_words
 	{
 	local($name)=@_;
diff --git a/gen/bcm/bn-586-apple.S b/gen/bcm/bn-586-apple.S
index f483ef1..3e6f791 100644
--- a/gen/bcm/bn-586-apple.S
+++ b/gen/bcm/bn-586-apple.S
@@ -156,16 +156,6 @@
 	popl	%ebx
 	popl	%ebp
 	ret
-.globl	_bn_div_words
-.private_extern	_bn_div_words
-.align	4
-_bn_div_words:
-L_bn_div_words_begin:
-	movl	4(%esp),%edx
-	movl	8(%esp),%eax
-	movl	12(%esp),%ecx
-	divl	%ecx
-	ret
 .globl	_bn_add_words
 .private_extern	_bn_add_words
 .align	4
diff --git a/gen/bcm/bn-586-linux.S b/gen/bcm/bn-586-linux.S
index fb83b22..808f63e 100644
--- a/gen/bcm/bn-586-linux.S
+++ b/gen/bcm/bn-586-linux.S
@@ -162,18 +162,6 @@
 	popl	%ebp
 	ret
 .size	bn_sqr_words,.-.L_bn_sqr_words_begin
-.globl	bn_div_words
-.hidden	bn_div_words
-.type	bn_div_words,@function
-.align	16
-bn_div_words:
-.L_bn_div_words_begin:
-	movl	4(%esp),%edx
-	movl	8(%esp),%eax
-	movl	12(%esp),%ecx
-	divl	%ecx
-	ret
-.size	bn_div_words,.-.L_bn_div_words_begin
 .globl	bn_add_words
 .hidden	bn_add_words
 .type	bn_add_words,@function
diff --git a/gen/bcm/bn-586-win.asm b/gen/bcm/bn-586-win.asm
index 09aafb8..1250eb6 100644
--- a/gen/bcm/bn-586-win.asm
+++ b/gen/bcm/bn-586-win.asm
@@ -161,15 +161,6 @@
 	pop	ebx
 	pop	ebp
 	ret
-global	_bn_div_words
-align	16
-_bn_div_words:
-L$_bn_div_words_begin:
-	mov	edx,DWORD [4+esp]
-	mov	eax,DWORD [8+esp]
-	mov	ecx,DWORD [12+esp]
-	div	ecx
-	ret
 global	_bn_add_words
 align	16
 _bn_add_words: